Class CsrfReactiveConfig

    • Field Detail

      • cookieForceSecure

        @ConfigItem(defaultValue="false")
        public boolean cookieForceSecure
        If enabled the CSRF cookie will have its 'secure' parameter set to 'true' when HTTP is used. It may be necessary when running behind an SSL terminating reverse proxy. The cookie will always be secure if HTTPS is used even if this property is set to false.
      • createTokenPath

        @ConfigItem
        public Optional<String> createTokenPath
        Create CSRF token only if the HTTP GET relative request path is the same as the one configured with this property.
      • verifyToken

        @ConfigItem(defaultValue="true")
        public boolean verifyToken
        Verify CSRF token in the CSRF filter. If this property is enabled then the input stream will be read by the CSRF filter to verify the token and recreated for the application code to read the data correctly. Therefore, it is recommended to disable this property when dealing with the large form payloads and instead compare CSRF form and cookie parameters in the application code using JAX-RS FormParam which refers to the formFieldName form property and CookieParam which refers to the cookieName cookie. Note that even if the CSRF token verification in the CSRF filter is disabled, the filter will still perform checks to ensure the token is available, has the correct tokenSize in bytes and that the Content-Type HTTP header is 'application/x-www-form-urlencoded'.
      • requireFormUrlEncoded

        @ConfigItem(defaultValue="true")
        public boolean requireFormUrlEncoded
        Require that only 'application/x-www-form-urlencoded' body is accepted for the token verification to proceed. Disable this property for the CSRF filter to avoid verifying the token for POST requests with other content types. This property is only effective if verifyToken property is enabled.
    • Constructor Detail

      • CsrfReactiveConfig

        public CsrfReactiveConfig()