Skip to content

Commit

Permalink
fix(jans-auth-server): npe - regression in token endpoint
Browse files Browse the repository at this point in the history
Native SSO

#2518
#2762
  • Loading branch information
yuriyz committed Oct 28, 2022
1 parent c368a02 commit e4064a9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ public JSONObject processTokenExchange(String scope, Function<JsonWebResponse, V
}

public void putNewDeviceSecret(JSONObject jsonObj, String sessionDn, Client client, String scope) {
if (!scope.contains(ScopeConstants.DEVICE_SSO)) {
if (StringUtils.isBlank(scope) || !scope.contains(ScopeConstants.DEVICE_SSO)) {
return;
}
if (!ArrayUtils.contains(client.getGrantTypes(), GrantType.TOKEN_EXCHANGE)) {
if (client == null || !ArrayUtils.contains(client.getGrantTypes(), GrantType.TOKEN_EXCHANGE)) {
log.debug("Skip device secret. Scope has {} value but client does not have Token Exchange Grant Type enabled ('urn:ietf:params:oauth:grant-type:token-exchange')", ScopeConstants.DEVICE_SSO);
return;
}
Expand Down

0 comments on commit e4064a9

Please sign in to comment.