public class UserModelIdentity extends Object implements Identity
| Modifier and Type | Field and Description |
|---|---|
protected RealmModel |
realm |
protected UserModel |
user |
| Constructor and Description |
|---|
UserModelIdentity(RealmModel realm,
UserModel user) |
| 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 UserModel user
public UserModelIdentity(RealmModel realm, UserModel user)
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.