Class CookieServerCsrfTokenRepository

    • Constructor Detail

      • CookieServerCsrfTokenRepository

        public CookieServerCsrfTokenRepository()
    • Method Detail

      • saveToken

        public reactor.core.publisher.Mono<java.lang.Void> saveToken​(org.springframework.web.server.ServerWebExchange exchange,
                                                                     CsrfToken token)
        Description copied from interface: ServerCsrfTokenRepository
        Saves the CsrfToken using the ServerWebExchange. If the CsrfToken is null, it is the same as deleting it.
        Specified by:
        saveToken in interface ServerCsrfTokenRepository
        Parameters:
        exchange - the ServerWebExchange to use
        token - the CsrfToken to save or null to delete
      • setCookieHttpOnly

        public void setCookieHttpOnly​(boolean cookieHttpOnly)
        Sets the HttpOnly attribute on the cookie containing the CSRF token
        Parameters:
        cookieHttpOnly - True to mark the cookie as http only. False otherwise.
      • setCookieName

        public void setCookieName​(java.lang.String cookieName)
        Sets the cookie name
        Parameters:
        cookieName - The cookie name
      • setParameterName

        public void setParameterName​(java.lang.String parameterName)
        Sets the parameter name
        Parameters:
        parameterName - The parameter name
      • setHeaderName

        public void setHeaderName​(java.lang.String headerName)
        Sets the header name
        Parameters:
        headerName - The header name
      • setCookiePath

        public void setCookiePath​(java.lang.String cookiePath)
        Sets the cookie path
        Parameters:
        cookiePath - The cookie path
      • setCookieDomain

        public void setCookieDomain​(java.lang.String cookieDomain)
        Sets the cookie domain
        Parameters:
        cookieDomain - The cookie domain
      • setSecure

        public void setSecure​(boolean secure)
        Sets the cookie secure flag. If not set, the value depends on ServerHttpRequest.getSslInfo().
        Parameters:
        secure - The value for the secure flag
        Since:
        5.5