@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(HttpRequest<?> request,
MutableHttpResponse<?> response,
Session session)
Encode the given Session into the response.
|
HttpSessionConfiguration |
getConfiguration() |
java.util.List<java.lang.String> |
resolveIds(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(HttpRequest<?> message)
HttpSessionIdResolver
resolveIds
in interface HttpSessionIdResolver
message
- The session IDOptional
public void encodeId(HttpRequest<?> request, MutableHttpResponse<?> response, Session session)
HttpSessionIdEncoder
encodeId
in interface HttpSessionIdEncoder
request
- The requestresponse
- The responsesession
- The sessionpublic HttpSessionConfiguration getConfiguration()