Revised code to avoid method invoked twice and double logging
This commit is contained in:
parent
d5ddbfd067
commit
89c5cf04bd
|
@ -299,8 +299,9 @@ public class DefaultKeycloakClient implements KeycloakClient {
|
|||
params.put(GRANT_TYPE_PARAMETER, Arrays.asList(UMA_TOKEN_GRANT_TYPE));
|
||||
|
||||
try {
|
||||
params.put(AUDIENCE_PARAMETER, Arrays.asList(URLEncoder.encode(checkAudience(audience), "UTF-8")));
|
||||
logger.trace("audience is {}", checkAudience(audience));
|
||||
String audienceToSend = URLEncoder.encode(checkAudience(audience), "UTF-8");
|
||||
params.put(AUDIENCE_PARAMETER, Arrays.asList(audienceToSend));
|
||||
logger.trace("audience is {}", audienceToSend);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
logger.error("Can't URL encode audience: {}", audience, e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue