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 AccessTokenaccessTokenprotected Attributesattributesprotected KeycloakSessionkeycloakSessionprotected RealmModelrealm
-
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 AccessTokengetAccessToken()AttributesgetAttributes()Returns the attributes or claims associated with this identity.StringgetId()Returns the unique identifier of this identity.booleanisResourceServer()-
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:IdentityReturns the unique identifier of this identity.
-
getAttributes
public Attributes getAttributes()
Description copied from interface:IdentityReturns the attributes or claims associated with this identity.- Specified by:
getAttributesin interfaceIdentity- Returns:
- the attributes or claims associated with this identity
-
getAccessToken
public AccessToken getAccessToken()
-
isResourceServer
public boolean isResourceServer()
-
-