Package org.keycloak.adapters.spi
Class InMemorySessionIdMapper
- java.lang.Object
-
- org.keycloak.adapters.spi.InMemorySessionIdMapper
-
- All Implemented Interfaces:
SessionIdMapper
public class InMemorySessionIdMapper extends Object implements SessionIdMapper
Maps external principal and SSO id to internal local http session id- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Constructor Summary
Constructors Constructor Description InMemorySessionIdMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears all mappings from this mapper.StringgetSessionFromSSO(String sso)Returns HTTP session ID from the given user session ID.Set<String>getUserSessions(String principal)Returns set of HTTP session IDs for the given principal.booleanhasSession(String id)Returnstrueif the mapper contains mapping for the given HTTP session ID.voidmap(String sso, String principal, String session)Establishes mapping between user session ID, principal and HTTP session ID.voidremoveSession(String session)Removes mappings for the given HTTP session ID.
-
-
-
Method Detail
-
hasSession
public boolean hasSession(String id)
Description copied from interface:SessionIdMapperReturnstrueif the mapper contains mapping for the given HTTP session ID.- Specified by:
hasSessionin interfaceSessionIdMapper- Returns:
-
clear
public void clear()
Description copied from interface:SessionIdMapperClears all mappings from this mapper.- Specified by:
clearin interfaceSessionIdMapper
-
getUserSessions
public Set<String> getUserSessions(String principal)
Description copied from interface:SessionIdMapperReturns set of HTTP session IDs for the given principal.- Specified by:
getUserSessionsin interfaceSessionIdMapper- Parameters:
principal- Principal- Returns:
-
getSessionFromSSO
public String getSessionFromSSO(String sso)
Description copied from interface:SessionIdMapperReturns HTTP session ID from the given user session ID.- Specified by:
getSessionFromSSOin interfaceSessionIdMapper- Parameters:
sso- User session ID- Returns:
-
map
public void map(String sso, String principal, String session)
Description copied from interface:SessionIdMapperEstablishes mapping between user session ID, principal and HTTP session ID.- Specified by:
mapin interfaceSessionIdMapper- Parameters:
sso- User session IDprincipal- Principalsession- HTTP session ID
-
removeSession
public void removeSession(String session)
Description copied from interface:SessionIdMapperRemoves mappings for the given HTTP session ID.- Specified by:
removeSessionin interfaceSessionIdMapper- Parameters:
session- HTTP session ID.
-
-