public class SessionHandlerImpl extends Object implements SessionHandler
DEFAULT_COOKIE_HTTP_ONLY_FLAG, DEFAULT_COOKIE_SECURE_FLAG, DEFAULT_NAG_HTTPS, DEFAULT_SESSION_COOKIE_NAME, DEFAULT_SESSION_COOKIE_PATH, DEFAULT_SESSION_TIMEOUT, DEFAULT_SESSIONID_MIN_LENGTH| Constructor and Description |
|---|
SessionHandlerImpl(String sessionCookieName,
String sessionCookiePath,
long sessionTimeout,
boolean nagHttps,
boolean sessionCookieSecure,
boolean sessionCookieHttpOnly,
int minLength,
SessionStore sessionStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(RoutingContext context)
Something has happened, so handle it.
|
SessionHandler |
setAuthProvider(AuthProvider authProvider)
Set an auth provider that will allow retrieving the User object from the session to the current routing context.
|
SessionHandler |
setCookieHttpOnlyFlag(boolean httpOnly)
Sets whether the 'HttpOnly' flag should be set for the session cookie.
|
SessionHandler |
setCookieSecureFlag(boolean secure)
Sets whether the 'secure' flag should be set for the session cookie.
|
SessionHandler |
setMinLength(int minLength)
Set expected session id minimum length.
|
SessionHandler |
setNagHttps(boolean nag)
Set whether a nagging log warning should be written if the session handler is
accessed over HTTP, not HTTPS
|
SessionHandler |
setSessionCookieName(String sessionCookieName)
Set the session cookie name
|
SessionHandler |
setSessionCookiePath(String sessionCookiePath)
Set the session cookie path
|
SessionHandler |
setSessionTimeout(long timeout)
Set the session timeout
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatepublic SessionHandlerImpl(String sessionCookieName, String sessionCookiePath, long sessionTimeout, boolean nagHttps, boolean sessionCookieSecure, boolean sessionCookieHttpOnly, int minLength, SessionStore sessionStore)
public SessionHandler setSessionTimeout(long timeout)
SessionHandlersetSessionTimeout in interface SessionHandlertimeout - the timeout, in ms.public SessionHandler setNagHttps(boolean nag)
SessionHandlersetNagHttps in interface SessionHandlernag - true to nagpublic SessionHandler setCookieSecureFlag(boolean secure)
SessionHandlersetCookieSecureFlag in interface SessionHandlersecure - true to set the secure flag on the cookiepublic SessionHandler setCookieHttpOnlyFlag(boolean httpOnly)
SessionHandlersetCookieHttpOnlyFlag in interface SessionHandlerhttpOnly - true to set the HttpOnly flag on the cookiepublic SessionHandler setSessionCookieName(String sessionCookieName)
SessionHandlersetSessionCookieName in interface SessionHandlersessionCookieName - the session cookie namepublic SessionHandler setSessionCookiePath(String sessionCookiePath)
SessionHandlersetSessionCookiePath in interface SessionHandlersessionCookiePath - the session cookie pathpublic SessionHandler setMinLength(int minLength)
SessionHandlersetMinLength in interface SessionHandlerminLength - the session id minimal lengthpublic SessionHandler setAuthProvider(AuthProvider authProvider)
SessionHandlersetAuthProvider in interface SessionHandlerauthProvider - any auth provider.public void handle(RoutingContext context)
Handlerhandle in interface Handler<RoutingContext>context - the event to handleCopyright © 2020. All rights reserved.