Class ClientModelIdentity
java.lang.Object
org.keycloak.authorization.common.ClientModelIdentity
- All Implemented Interfaces:
Identity
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the attributes or claims associated with this identity.getId()Returns the unique identifier of this identity.booleanhasClientRole(String clientId, String roleName) Indicates if this identity is granted with a client role with the givenroleName.booleanhasOneClientRole(String clientId, String... roleNames) Indicates if this identity is granted with a client role of one of the givenroleNames.booleanhasRealmRole(String roleName) Indicates if this identity is granted with a realm role with the givenroleName.
-
Field Details
-
realm
-
client
-
serviceAccount
-
-
Constructor Details
-
ClientModelIdentity
-
-
Method Details
-
getId
Description copied from interface:IdentityReturns the unique identifier of this identity. -
getAttributes
Description copied from interface:IdentityReturns the attributes or claims associated with this identity.- Specified by:
getAttributesin interfaceIdentity- Returns:
- the attributes or claims associated with this identity
-
hasRealmRole
Description copied from interface:IdentityIndicates if this identity is granted with a realm role with the givenroleName.- Specified by:
hasRealmRolein interfaceIdentity- Parameters:
roleName- the name of the role- Returns:
- true if the identity has the given role. Otherwise, it returns false.
-
hasClientRole
Description copied from interface:IdentityIndicates if this identity is granted with a client role with the givenroleName.- Specified by:
hasClientRolein interfaceIdentity- Parameters:
clientId- the client idroleName- the name of the role- Returns:
- true if the identity has the given role. Otherwise, it returns false.
-
hasOneClientRole
Description copied from interface:IdentityIndicates if this identity is granted with a client role of one of the givenroleNames.- Specified by:
hasOneClientRolein interfaceIdentity- Parameters:
clientId- the client idroleNames- list- Returns:
- true if the identity has any of the given roles. Otherwise, it returns false.
-