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()
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.