Class IdBasedSessionManager
java.lang.Object
org.forgerock.openig.session.cookie.IdBasedSessionManager
- All Implemented Interfaces:
AsyncSessionManager
An implementation of
AsyncSessionManager
storing session ID in a session cookie.-
Constructor Summary
ConstructorDescriptionIdBasedSessionManager
(org.forgerock.openig.http.protocol.CookieBuilder cookieBuilder, org.forgerock.openig.session.cookie.InMemorySessionStore sessionStore) Create a newIdBasedSessionManager
instance. -
Method Summary
-
Constructor Details
-
IdBasedSessionManager
public IdBasedSessionManager(org.forgerock.openig.http.protocol.CookieBuilder cookieBuilder, org.forgerock.openig.session.cookie.InMemorySessionStore sessionStore) Create a newIdBasedSessionManager
instance.- Parameters:
cookieBuilder
- the cookie builder to use to create the session cookie.sessionStore
- the session store to use to store the session content.
-
-
Method Details
-
loadAsync
Description copied from interface:AsyncSessionManager
Loads a new Session for the givenRequest
. The implementations are free to keep a reference to theRequest
.The session object is scoped by the
Request
's own lifecycle.- Specified by:
loadAsync
in interfaceAsyncSessionManager
- Parameters:
request
- Request to create a session for.- Returns:
- a new Session promise (never null).
-
saveAsync
Description copied from interface:AsyncSessionManager
Saves the session into the provided response.- Specified by:
saveAsync
in interfaceAsyncSessionManager
- Parameters:
session
- The session to save.response
- The response to save the session to.- Returns:
- a promise completed with null if save operation succeeded, otherwise failed with an
IOException
.
-