Package org.keycloak.services.managers
Class AuthenticationSessionManager
java.lang.Object
org.keycloak.services.managers.AuthenticationSessionManager
- Author:
- Marek Posolda
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAuthenticationSession(RealmModel realm, boolean browserCookie) Creates a fresh authentication session for the given realm .getAuthenticationSessionByIdAndClient(RealmModel realm, String authSessionId, ClientModel client, String tabId) getCurrentAuthenticationSession(RealmModel realm, ClientModel client, String tabId) Returns current authentication session if it exists, otherwise returnsnull.getUserSession(AuthenticationSessionModel authSession) voidremoveAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession, boolean expireRestartCookie) voidremoveTabIdInAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession) voidsetAuthSessionCookie(String authSessionId, RealmModel realm)
-
Field Details
-
AUTH_SESSION_ID
- See Also:
-
AUTH_SESSION_COOKIE_LIMIT
public static final int AUTH_SESSION_COOKIE_LIMIT- See Also:
-
-
Constructor Details
-
AuthenticationSessionManager
-
-
Method Details
-
createAuthenticationSession
public RootAuthenticationSessionModel createAuthenticationSession(RealmModel realm, boolean browserCookie) Creates a fresh authentication session for the given realm . Optionally sets the browser authentication session cookieAUTH_SESSION_IDwith the ID of the new session.- Parameters:
realm-browserCookie- Set the cookie in the browser for the- Returns:
-
getCurrentRootAuthenticationSession
-
getUserSessionFromAuthCookie
-
getCurrentAuthenticationSession
public AuthenticationSessionModel getCurrentAuthenticationSession(RealmModel realm, ClientModel client, String tabId) Returns current authentication session if it exists, otherwise returnsnull.- Parameters:
realm-- Returns:
-
setAuthSessionCookie
- Parameters:
authSessionId- decoded authSessionId (without route info attached)realm-
-
removeAuthenticationSession
public void removeAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession, boolean expireRestartCookie) -
removeTabIdInAuthenticationSession
public void removeTabIdInAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession) -
getUserSession
-
getAuthenticationSessionByIdAndClient
public AuthenticationSessionModel getAuthenticationSessionByIdAndClient(RealmModel realm, String authSessionId, ClientModel client, String tabId)
-