Class AccessTokenAuthContext
java.lang.Object
org.openremote.container.security.keycloak.AccessTokenAuthContext
- All Implemented Interfaces:
AuthContext
Keycloak-based authorization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.keycloak.representations.AccessTokenprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionAccessTokenAuthContext(String authenticatedRealm, org.keycloak.representations.AccessToken accessToken) -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasRealmRole(String role) booleanhasResourceRole(String role, String resource) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openremote.container.security.AuthContext
hasResourceRoleOrIsSuperUser, isRealmAccessibleByUser, isSuperUser
-
Field Details
-
authenticatedRealm
-
accessToken
protected final org.keycloak.representations.AccessToken accessToken
-
-
Constructor Details
-
AccessTokenAuthContext
public AccessTokenAuthContext(String authenticatedRealm, org.keycloak.representations.AccessToken accessToken)
-
-
Method Details
-
getAuthenticatedRealmName
- Specified by:
getAuthenticatedRealmNamein interfaceAuthContext
-
getUsername
- Specified by:
getUsernamein interfaceAuthContext
-
getUserId
- Specified by:
getUserIdin interfaceAuthContext
-
getClientId
- Specified by:
getClientIdin interfaceAuthContext
-
hasRealmRole
- Specified by:
hasRealmRolein interfaceAuthContext
-
hasResourceRole
- Specified by:
hasResourceRolein interfaceAuthContext
-