Class ServerCsrfTokenRequestAttributeHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(org.springframework.web.server.ServerWebExchange exchange, reactor.core.publisher.Mono<CsrfToken> csrfToken)
      Handles a request using a CsrfToken.
      reactor.core.publisher.Mono<java.lang.String> resolveCsrfTokenValue​(org.springframework.web.server.ServerWebExchange exchange, CsrfToken csrfToken)
      Returns the token value resolved from the provided ServerWebExchange and CsrfToken or Mono.empty() if not available.
      void setTokenFromMultipartDataEnabled​(boolean tokenFromMultipartDataEnabled)
      Specifies if the ServerCsrfTokenRequestResolver should try to resolve the actual CSRF token from the body of multipart data requests.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServerCsrfTokenRequestAttributeHandler

        public ServerCsrfTokenRequestAttributeHandler()
    • Method Detail

      • setTokenFromMultipartDataEnabled

        public void setTokenFromMultipartDataEnabled​(boolean tokenFromMultipartDataEnabled)
        Specifies if the ServerCsrfTokenRequestResolver should try to resolve the actual CSRF token from the body of multipart data requests.
        Parameters:
        tokenFromMultipartDataEnabled - true if should read from multipart form body, else false. Default is false