public class ClientModelIdentity extends Object implements Identity
Modifier and Type | Field and Description |
---|---|
protected ClientModel |
client |
protected RealmModel |
realm |
protected UserModel |
serviceAccount |
Constructor and Description |
---|
ClientModelIdentity(KeycloakSession session,
ClientModel client) |
Modifier and Type | Method and Description |
---|---|
Attributes |
getAttributes()
Returns the attributes or claims associated with this identity.
|
String |
getId()
Returns the unique identifier of this identity.
|
boolean |
hasClientRole(String clientId,
String roleName)
Indicates if this identity is granted with a client role with the given
roleName . |
boolean |
hasRealmRole(String roleName)
Indicates if this identity is granted with a realm role with the given
roleName . |
protected RealmModel realm
protected ClientModel client
protected UserModel serviceAccount
public ClientModelIdentity(KeycloakSession session, ClientModel client)
public String getId()
Identity
public Attributes getAttributes()
Identity
getAttributes
in interface Identity
public boolean hasRealmRole(String roleName)
Identity
roleName
.hasRealmRole
in interface Identity
roleName
- the name of the rolepublic boolean hasClientRole(String clientId, String roleName)
Identity
roleName
.hasClientRole
in interface Identity
clientId
- the client idroleName
- the name of the roleCopyright © 2021 JBoss by Red Hat. All rights reserved.