@Filter(value="/**") public class HttpSessionFilter extends OncePerRequestHttpServerFilter
HttpServerFilter
that resolves the current user Session
if present and encodes the Session ID in
the response.Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
ORDER
The order of the filter.
|
static java.lang.CharSequence |
SESSION_ATTRIBUTE
Constant for Micronaut SESSION attribute.
|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
HttpSessionFilter(SessionStore<Session> sessionStore,
HttpSessionIdResolver[] resolvers,
HttpSessionIdEncoder[] encoders)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected org.reactivestreams.Publisher<MutableHttpResponse<?>> |
doFilterOnce(HttpRequest<?> request,
ServerFilterChain chain) |
int |
getOrder() |
doFilter, getKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doFilter
public static final java.lang.Integer ORDER
public static final java.lang.CharSequence SESSION_ATTRIBUTE
public HttpSessionFilter(SessionStore<Session> sessionStore, HttpSessionIdResolver[] resolvers, HttpSessionIdEncoder[] encoders)
sessionStore
- The session storeresolvers
- The HTTP session id resolversencoders
- The HTTP session id encoderspublic int getOrder()
protected org.reactivestreams.Publisher<MutableHttpResponse<?>> doFilterOnce(HttpRequest<?> request, ServerFilterChain chain)
doFilterOnce
in class OncePerRequestHttpServerFilter
request
- The HttpRequest
instancechain
- The ServerFilterChain
instancePublisher
for the Http response