Package io.quarkus.csrf.reactive.runtime
Class CsrfResponseFilter
- java.lang.Object
-
- io.quarkus.csrf.reactive.runtime.CsrfResponseFilter
-
public class CsrfResponseFilter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.enterprise.inject.Instance<CsrfReactiveConfig>config
-
Constructor Summary
Constructors Constructor Description CsrfResponseFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(javax.ws.rs.container.ContainerRequestContext requestContext, javax.ws.rs.container.ContainerResponseContext responseContext, io.vertx.ext.web.RoutingContext routing)If the requirements below are true, sets a cookie by the name "csrf_token" that contains a CSRF token.
-
-
-
Field Detail
-
config
@Inject javax.enterprise.inject.Instance<CsrfReactiveConfig> config
-
-
Method Detail
-
filter
public void filter(javax.ws.rs.container.ContainerRequestContext requestContext, javax.ws.rs.container.ContainerResponseContext responseContext, io.vertx.ext.web.RoutingContext routing)If the requirements below are true, sets a cookie by the name "csrf_token" that contains a CSRF token.- The request method is
GET. - The request does not contain a valid CSRF token cookie.
- Throws:
IllegalStateException- if theRoutingContextdoes not have a value for the key "csrf_token" and a cookie needs to be set.
- The request method is
-
-