Checking realm role directly
This commit is contained in:
parent
b78cc63f0d
commit
4e43518b2a
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ public class AuthorizationTokenService {
|
|||
KeycloakEvaluationContext evaluationContext = new KeycloakEvaluationContext(this.authorization.getKeycloakSession());
|
||||
KeycloakIdentity identity = (KeycloakIdentity) evaluationContext.getIdentity();
|
||||
|
||||
if (!identity.hasRole("uma_authorization")) {
|
||||
if (!identity.hasRealmRole("uma_authorization")) {
|
||||
throw new ErrorResponseException(OAuthErrorException.INVALID_SCOPE, "Requires uma_authorization scope.", Status.FORBIDDEN);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue