public class AuthenticationSessionManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTH_SESSION_ID |
| Constructor and Description |
|---|
AuthenticationSessionManager(KeycloakSession session) |
| Modifier and Type | Method and Description |
|---|---|
RootAuthenticationSessionModel |
createAuthenticationSession(RealmModel realm,
boolean browserCookie)
Creates a fresh authentication session for the given realm .
|
AuthenticationSessionModel |
getAuthenticationSessionByIdAndClient(RealmModel realm,
String authSessionId,
ClientModel client) |
AuthenticationSessionModel |
getCurrentAuthenticationSession(RealmModel realm,
ClientModel client)
Returns current authentication session if it exists, otherwise returns
null. |
String |
getCurrentAuthenticationSessionId(RealmModel realm)
Returns ID of current authentication session if it exists, otherwise returns
null. |
UserSessionModel |
getUserSession(AuthenticationSessionModel authSession) |
void |
removeAuthenticationSession(RealmModel realm,
AuthenticationSessionModel authSession,
boolean expireRestartCookie) |
void |
setAuthSessionCookie(String authSessionId,
RealmModel realm) |
public static final String AUTH_SESSION_ID
public AuthenticationSessionManager(KeycloakSession session)
public RootAuthenticationSessionModel createAuthenticationSession(RealmModel realm, boolean browserCookie)
AUTH_SESSION_ID with the ID of the new session.realm - browserCookie - Set the cookie in the browser for thepublic String getCurrentAuthenticationSessionId(RealmModel realm)
null.realm - public AuthenticationSessionModel getCurrentAuthenticationSession(RealmModel realm, ClientModel client)
null.realm - public void setAuthSessionCookie(String authSessionId, RealmModel realm)
public void removeAuthenticationSession(RealmModel realm, AuthenticationSessionModel authSession, boolean expireRestartCookie)
public UserSessionModel getUserSession(AuthenticationSessionModel authSession)
public AuthenticationSessionModel getAuthenticationSessionByIdAndClient(RealmModel realm, String authSessionId, ClientModel client)
Copyright © 2017 JBoss by Red Hat. All rights reserved.