Package org.keycloak.services.managers
Class AuthenticationSessionManager
- java.lang.Object
- 
- org.keycloak.services.managers.AuthenticationSessionManager
 
- 
 public class AuthenticationSessionManager extends Object - Author:
- Marek Posolda
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intAUTH_SESSION_COOKIE_LIMITstatic StringAUTH_SESSION_ID
 - 
Constructor SummaryConstructors Constructor Description AuthenticationSessionManager(KeycloakSession session)
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
AUTH_SESSION_IDpublic static final String AUTH_SESSION_ID - See Also:
- Constant Field Values
 
 - 
AUTH_SESSION_COOKIE_LIMITpublic static final int AUTH_SESSION_COOKIE_LIMIT - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
AuthenticationSessionManagerpublic AuthenticationSessionManager(KeycloakSession session) 
 
- 
 - 
Method Detail- 
createAuthenticationSessionpublic 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:
 
 - 
getCurrentRootAuthenticationSessionpublic RootAuthenticationSessionModel getCurrentRootAuthenticationSession(RealmModel realm) 
 - 
getUserSessionFromAuthCookiepublic UserSessionModel getUserSessionFromAuthCookie(RealmModel realm) 
 - 
getCurrentAuthenticationSessionpublic AuthenticationSessionModel getCurrentAuthenticationSession(RealmModel realm, ClientModel client, String tabId) Returns current authentication session if it exists, otherwise returnsnull.- Parameters:
- realm-
- Returns:
 
 - 
setAuthSessionCookiepublic void setAuthSessionCookie(String authSessionId, RealmModel realm) - Parameters:
- authSessionId- decoded authSessionId (without route info attached)
- realm-
 
 - 
removeAuthenticationSessionpublic void removeAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession, boolean expireRestartCookie) 
 - 
removeTabIdInAuthenticationSessionpublic void removeTabIdInAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession) 
 - 
getUserSessionpublic UserSessionModel getUserSession(AuthenticationSessionModel authSession) 
 - 
getAuthenticationSessionByIdAndClientpublic AuthenticationSessionModel getAuthenticationSessionByIdAndClient(RealmModel realm, String authSessionId, ClientModel client, String tabId) 
 
- 
 
-