Package net.ltgt.oidc.servlet
Class KeycloakUserPrincipal
java.lang.Object
net.ltgt.oidc.servlet.KeycloakUserPrincipal
- All Implemented Interfaces:
Principal,UserPrincipal
A
UserPrincipal that extracts Keycloak realm roles from the user information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the user has a given role.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ltgt.oidc.servlet.UserPrincipal
getName
-
Constructor Details
-
KeycloakUserPrincipal
-
-
Method Details
-
hasRole
Description copied from interface:UserPrincipalReturns whether the user has a given role.- Specified by:
hasRolein interfaceUserPrincipal- See Also:
-
getSessionInfo
- Specified by:
getSessionInfoin interfaceUserPrincipal
-