Class AuthenticatedClientSessionAdapter
java.lang.Object
org.keycloak.models.sessions.infinispan.AuthenticatedClientSessionAdapter
- All Implemented Interfaces:
AuthenticatedClientSessionModel
,CommonClientSessionModel
public class AuthenticatedClientSessionAdapter
extends Object
implements AuthenticatedClientSessionModel
- Author:
- Marek Posolda
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.sessions.CommonClientSessionModel
CommonClientSessionModel.Action, CommonClientSessionModel.ExecutionStatus
-
Field Summary
Fields inherited from interface org.keycloak.models.AuthenticatedClientSessionModel
REFRESH_TOKEN_LAST_REFRESH_PREFIX, REFRESH_TOKEN_PREFIX, REFRESH_TOKEN_USE_PREFIX, STARTED_AT_NOTE, USER_SESSION_REMEMBER_ME_NOTE, USER_SESSION_STARTED_AT_NOTE
-
Constructor Summary
ConstructorDescriptionAuthenticatedClientSessionAdapter
(KeycloakSession kcSession, SessionRefreshStore provider, AuthenticatedClientSessionEntity entity, ClientModel client, UserSessionModel userSession, SessionsChangelogBasedTransaction<UUID, AuthenticatedClientSessionEntity> clientSessionUpdateTx, boolean offline) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Detaches the client session from its user session.getId()
getNotes()
getRealm()
int
void
removeNote
(String name) void
void
void
void
setProtocol
(String method) void
setRedirectUri
(String uri) void
setTimestamp
(int timestamp) Set the timestamp for the client session.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.models.AuthenticatedClientSessionModel
getCurrentRefreshToken, getCurrentRefreshTokenUseCount, getRefreshToken, getRefreshTokenLastRefresh, getRefreshTokenUseCount, getStarted, getUserSessionStarted, isUserSessionRememberMe, setCurrentRefreshToken, setCurrentRefreshTokenUseCount, setRefreshToken, setRefreshTokenLastRefresh, setRefreshTokenUseCount
-
Constructor Details
-
AuthenticatedClientSessionAdapter
public AuthenticatedClientSessionAdapter(KeycloakSession kcSession, SessionRefreshStore provider, AuthenticatedClientSessionEntity entity, ClientModel client, UserSessionModel userSession, SessionsChangelogBasedTransaction<UUID, AuthenticatedClientSessionEntity> clientSessionUpdateTx, boolean offline)
-
-
Method Details
-
detachFromUserSession
public void detachFromUserSession()Detaches the client session from its user session.This method does not delete the client session from user session records, it only removes the client session. The list of client sessions within user session is updated lazily for performance reasons.
- Specified by:
detachFromUserSession
in interfaceAuthenticatedClientSessionModel
-
getUserSession
- Specified by:
getUserSession
in interfaceAuthenticatedClientSessionModel
-
getRedirectUri
- Specified by:
getRedirectUri
in interfaceCommonClientSessionModel
-
setRedirectUri
- Specified by:
setRedirectUri
in interfaceCommonClientSessionModel
-
getId
- Specified by:
getId
in interfaceAuthenticatedClientSessionModel
-
getRealm
- Specified by:
getRealm
in interfaceCommonClientSessionModel
-
getClient
- Specified by:
getClient
in interfaceCommonClientSessionModel
-
getTimestamp
public int getTimestamp()- Specified by:
getTimestamp
in interfaceAuthenticatedClientSessionModel
-
setTimestamp
public void setTimestamp(int timestamp) Description copied from interface:AuthenticatedClientSessionModel
Set the timestamp for the client session. If the timestamp is smaller or equal than the current timestamp, the operation is ignored.- Specified by:
setTimestamp
in interfaceAuthenticatedClientSessionModel
-
getAction
- Specified by:
getAction
in interfaceCommonClientSessionModel
-
setAction
- Specified by:
setAction
in interfaceCommonClientSessionModel
-
getProtocol
- Specified by:
getProtocol
in interfaceCommonClientSessionModel
-
setProtocol
- Specified by:
setProtocol
in interfaceCommonClientSessionModel
-
getNote
- Specified by:
getNote
in interfaceAuthenticatedClientSessionModel
-
setNote
- Specified by:
setNote
in interfaceAuthenticatedClientSessionModel
-
removeNote
- Specified by:
removeNote
in interfaceAuthenticatedClientSessionModel
-
getNotes
- Specified by:
getNotes
in interfaceAuthenticatedClientSessionModel
-
restartClientSession
public void restartClientSession()- Specified by:
restartClientSession
in interfaceAuthenticatedClientSessionModel
-