Package io.micronaut.session.http
Class HttpSessionFilter
java.lang.Object
io.micronaut.session.http.HttpSessionFilter
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,io.micronaut.http.filter.HttpFilter
,io.micronaut.http.filter.HttpServerFilter
@Filter("/**")
public class HttpSessionFilter
extends Object
implements io.micronaut.http.filter.HttpServerFilter
A
HttpServerFilter
that resolves the current user Session
if present and encodes the Session ID in
the response.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Integer
The order of the filter.static final CharSequence
Constant for Micronaut SESSION attribute.Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionHttpSessionFilter
(SessionStore<Session> sessionStore, HttpSessionIdResolver[] resolvers, HttpSessionIdEncoder[] encoders) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.filter.HttpServerFilter
doFilter
-
Field Details
-
ORDER
The order of the filter. -
SESSION_ATTRIBUTE
Constant for Micronaut SESSION attribute.
-
-
Constructor Details
-
HttpSessionFilter
public HttpSessionFilter(SessionStore<Session> sessionStore, HttpSessionIdResolver[] resolvers, HttpSessionIdEncoder[] encoders) Constructor.- Parameters:
sessionStore
- The session storeresolvers
- The HTTP session id resolversencoders
- The HTTP session id encoders
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-
doFilter
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> doFilter(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain) - Specified by:
doFilter
in interfaceio.micronaut.http.filter.HttpServerFilter
-