public class SessionManager extends Object
The SessionManager is responsible to track users sessions.
| Modifier and Type | Class and Description |
|---|---|
static interface |
SessionManager.InitializationCallback
PicketLink provides support for different bindings or containers.
|
static class |
SessionManager.SessionManagerListener
This listeners is responsible to remove sessions from the registry when destroyed by the container.
|
| Constructor and Description |
|---|
SessionManager(javax.servlet.ServletContext context,
SessionManager.InitializationCallback initializationCallback)
Creates a new instance and associate it with the given
ServletContext. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Principal principal,
javax.servlet.http.HttpSession session)
Registers the session associated with the given principal.
|
static SessionManager |
get(javax.servlet.ServletContext context)
Returns the instance associated with the given
ServletContext. |
void |
invalidate(Principal principal)
Invalidates the session associated with the given principal.
|
public SessionManager(javax.servlet.ServletContext context,
SessionManager.InitializationCallback initializationCallback)
Creates a new instance and associate it with the given ServletContext.
context - public static SessionManager get(javax.servlet.ServletContext context) throws IllegalArgumentException
Returns the instance associated with the given ServletContext.
Before calling this method, make sure you have initialized the application's context with a session manager.
context - IllegalArgumentException - If no SessionManager exists in the given ServletContext.public void add(Principal principal, javax.servlet.http.HttpSession session)
Registers the session associated with the given principal.
principal - session - public void invalidate(Principal principal)
Invalidates the session associated with the given principal.
principal - Copyright © 2024. All rights reserved.