vertx / io.vertx.rxjava.ext.web.handler / SessionHandler

SessionHandler

open class SessionHandler : Handler<RoutingContext>

A handler that maintains a io.vertx.rxjava.ext.web.Session for each browser session.

It looks up the session for each request based on a session cookie which contains a session ID. It stores the session when the response is ended in the session store.

The session is available on the routing context with .

The session handler requires a io.vertx.rxjava.ext.web.handler.CookieHandler to be on the routing chain before it.

NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.SessionHandler non RX-ified interface using Vert.x codegen.

Constructors

<init>

SessionHandler(delegate: SessionHandler)

Properties

__TYPE_ARG

static val __TYPE_ARG: TypeArg<SessionHandler>

Functions

create

open static fun create(sessionStore: SessionStore): SessionHandler

Create a session handler

equals

open fun equals(other: Any?): Boolean

getDelegate

open fun getDelegate(): SessionHandler

handle

open fun handle(arg0: RoutingContext): Unit

hashCode

open fun hashCode(): Int

newInstance

open static fun newInstance(arg: SessionHandler): SessionHandler

setCookieHttpOnlyFlag

open fun setCookieHttpOnlyFlag(httpOnly: Boolean): SessionHandler

Sets whether the 'HttpOnly' flag should be set for the session cookie. When set this flag instructs browsers to prevent Javascript access to the the cookie. Used as a line of defence against the most common XSS attacks.

setCookieSecureFlag

open fun setCookieSecureFlag(secure: Boolean): SessionHandler

Sets whether the 'secure' flag should be set for the session cookie. When set this flag instructs browsers to only send the cookie over HTTPS. Note that this will probably stop your sessions working if used without HTTPS (e.g. in development).

setMinLength

open fun setMinLength(minLength: Int): SessionHandler

Set expected session id minimum length.

setNagHttps

open fun setNagHttps(nag: Boolean): SessionHandler

Set whether a nagging log warning should be written if the session handler is accessed over HTTP, not HTTPS

setSessionCookieName

open fun setSessionCookieName(sessionCookieName: String): SessionHandler

Set the session cookie name

setSessionTimeout

open fun setSessionTimeout(timeout: Long): SessionHandler

Set the session timeout

toString

open fun toString(): String