Authorized party field is used first refresshing the token if clientId is not provided
This commit is contained in:
parent
c8e2a30489
commit
cb05b4a63b
|
@ -156,8 +156,17 @@ public class OpenIdConnectRESTHelper {
|
|||
Map<String, List<String>> params = new HashMap<>();
|
||||
params.put("grant_type", Arrays.asList("refresh_token"));
|
||||
if (clientId == null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Client id not provided, using authorized party field (azp)");
|
||||
}
|
||||
clientId = token.getAzp();
|
||||
if (clientId == null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Authorized party field (azp) not present, getting one of the audience field (aud)");
|
||||
}
|
||||
clientId = getFirstAudienceNoAccount(token);
|
||||
}
|
||||
}
|
||||
params.put("client_id", Arrays.asList(URLEncoder.encode(clientId, "UTF-8")));
|
||||
if (clientSecret != null) {
|
||||
params.put("client_secret", Arrays.asList(URLEncoder.encode(clientSecret, "UTF-8")));
|
||||
|
|
Loading…
Reference in New Issue