@Singleton
@Requires(property="micronaut.session.http.cookie",
notEquals="false")
public class CookieHttpSessionStrategy
extends java.lang.Object
implements HttpSessionIdStrategy
Session identifiers from cookies.| Constructor and Description |
|---|
CookieHttpSessionStrategy(HttpSessionConfiguration configuration)
Constructor.
|
CookieHttpSessionStrategy(HttpSessionConfiguration configuration,
CookieHttpSessionIdGenerator cookieHttpSessionIdGenerator)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encodeId(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse<?> response,
Session session)
Encode the given Session into the response.
|
HttpSessionConfiguration |
getConfiguration() |
java.util.List<java.lang.String> |
resolveIds(io.micronaut.http.HttpRequest<?> message)
Resolve the Session ID from the given HTTP message.
|
public CookieHttpSessionStrategy(HttpSessionConfiguration configuration)
configuration - The HTTP session configurationpublic CookieHttpSessionStrategy(HttpSessionConfiguration configuration, CookieHttpSessionIdGenerator cookieHttpSessionIdGenerator)
configuration - The HTTP session configurationcookieHttpSessionIdGenerator - Cookie HTTP Session Id generatorpublic java.util.List<java.lang.String> resolveIds(io.micronaut.http.HttpRequest<?> message)
HttpSessionIdResolverresolveIds in interface HttpSessionIdResolvermessage - The session IDOptionalpublic void encodeId(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse<?> response,
Session session)
HttpSessionIdEncoderencodeId in interface HttpSessionIdEncoderrequest - The requestresponse - The responsesession - The sessionpublic HttpSessionConfiguration getConfiguration()