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()
Identitypublic Attributes getAttributes()
IdentitygetAttributes in interface Identitypublic boolean hasRealmRole(String roleName)
IdentityroleName.hasRealmRole in interface IdentityroleName - the name of the rolepublic boolean hasClientRole(String clientId, String roleName)
IdentityroleName.hasClientRole in interface IdentityclientId - the client idroleName - the name of the roleCopyright © 2021 JBoss by Red Hat. All rights reserved.