Rationalized logs

This commit is contained in:
Mauro Mugnaini 2020-07-03 17:32:48 +02:00
parent 2475ee6f00
commit bb7c32faae
1 changed files with 4 additions and 12 deletions

View File

@ -27,9 +27,7 @@ public class OIDCUmaUtil {
String infraContext) {
try {
if (log.isDebugEnabled()) {
log.debug("Getting client token from server");
}
log.debug("Getting client token from server");
JWTToken clientToken = OpenIdConnectRESTHelper.queryClientToken(clientId, clientSecret, tokenURL);
provideClientUMATokenInThreadLocal(clientToken.getAsBearer(), tokenURL, infraContext);
} catch (Exception e) {
@ -48,19 +46,13 @@ public class OIDCUmaUtil {
log.error("Cannot URL encode context", e);
return;
}
if (log.isDebugEnabled()) {
log.debug("URL encoded context is: " + encodedContext);
}
log.debug("URL encoded context is: {}", encodedContext);
try {
if (log.isDebugEnabled()) {
log.debug("Getting UMA token from server");
}
log.debug("Getting UMA token from server");
JWTToken umaToken = OpenIdConnectRESTHelper.queryUMAToken(tokenURL, clientAuthorizationBearer,
encodedContext, null);
if (log.isDebugEnabled()) {
log.debug("Setting token in the UMA JWT provider");
}
log.debug("Setting token in the UMA JWT provider");
UmaJWTProvider.instance.set(JWTTokenUtil.getRawContent(umaToken));
} catch (Exception e) {
log.error("Cannot retrieve client UMA token", e);