Class KeycloakIdentity
- java.lang.Object
-
- org.keycloak.authorization.common.KeycloakIdentity
-
- All Implemented Interfaces:
Identity
public class KeycloakIdentity extends Object implements Identity
- Author:
- Pedro Igor
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessToken
accessToken
protected Attributes
attributes
protected KeycloakSession
keycloakSession
protected RealmModel
realm
-
Constructor Summary
Constructors Constructor Description KeycloakIdentity(KeycloakSession keycloakSession)
KeycloakIdentity(KeycloakSession keycloakSession, IDToken token)
KeycloakIdentity(AccessToken accessToken, KeycloakSession keycloakSession)
KeycloakIdentity(IDToken token, KeycloakSession keycloakSession, RealmModel realm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessToken
getAccessToken()
Attributes
getAttributes()
Returns the attributes or claims associated with this identity.String
getId()
Returns the unique identifier of this identity.boolean
isResourceServer()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.authorization.identity.Identity
hasClientRole, hasOneClientRole, hasRealmRole
-
-
-
-
Field Detail
-
accessToken
protected final AccessToken accessToken
-
realm
protected final RealmModel realm
-
keycloakSession
protected final KeycloakSession keycloakSession
-
attributes
protected final Attributes attributes
-
-
Constructor Detail
-
KeycloakIdentity
public KeycloakIdentity(KeycloakSession keycloakSession)
-
KeycloakIdentity
public KeycloakIdentity(KeycloakSession keycloakSession, IDToken token)
-
KeycloakIdentity
public KeycloakIdentity(IDToken token, KeycloakSession keycloakSession, RealmModel realm)
-
KeycloakIdentity
public KeycloakIdentity(AccessToken accessToken, KeycloakSession keycloakSession)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:Identity
Returns the unique identifier of this identity.
-
getAttributes
public Attributes getAttributes()
Description copied from interface:Identity
Returns the attributes or claims associated with this identity.- Specified by:
getAttributes
in interfaceIdentity
- Returns:
- the attributes or claims associated with this identity
-
getAccessToken
public AccessToken getAccessToken()
-
isResourceServer
public boolean isResourceServer()
-
-