diff --git a/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java b/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java index 0a3b67380..525ea2eb0 100644 --- a/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java +++ b/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java @@ -191,7 +191,7 @@ public class DefaultOAuth2ProviderTokenService implements OAuth2TokenEntityServi // get the stored scopes from the authentication holder's authorization request; these are the scopes associated with the refresh token Set refreshScopes = new HashSet(refreshToken.getAuthenticationHolder().getAuthentication().getAuthorizationRequest().getScope()); - Set scope = new HashSet(authRequest.getScope()); + Set scope = authRequest.getScope() == null ? new HashSet() : new HashSet(authRequest.getScope()); if (scope != null && !scope.isEmpty()) { // ensure a proper subset of scopes if (refreshScopes != null && refreshScopes.containsAll(scope)) {