Class CsrfTokenRequestAttributeHandler

    • Constructor Detail

      • CsrfTokenRequestAttributeHandler

        public CsrfTokenRequestAttributeHandler()
    • Method Detail

      • setCsrfRequestAttributeName

        public final void setCsrfRequestAttributeName​(java.lang.String csrfRequestAttributeName)
        The CsrfToken is available as a request attribute named CsrfToken.class.getName(). By default, an additional request attribute that is the same as CsrfToken.getParameterName() is set. This attribute allows overriding the additional attribute.
        Parameters:
        csrfRequestAttributeName - the name of an additional request attribute with the value of the CsrfToken. Default is CsrfToken.getParameterName()
      • handle

        public void handle​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           java.util.function.Supplier<CsrfToken> deferredCsrfToken)
        Description copied from interface: CsrfTokenRequestHandler
        Handles a request using a CsrfToken.
        Specified by:
        handle in interface CsrfTokenRequestHandler
        Parameters:
        request - the HttpServletRequest being handled
        response - the HttpServletResponse being handled
        deferredCsrfToken - the CsrfToken created by the CsrfTokenRepository