Interface CsrfTokenRepository

    • Method Detail

      • generateToken

        CsrfToken generateToken​(javax.servlet.http.HttpServletRequest request)
        Generates a CsrfToken
        Parameters:
        request - the HttpServletRequest to use
        Returns:
        the CsrfToken that was generated. Cannot be null.
      • saveToken

        void saveToken​(CsrfToken token,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
        Saves the CsrfToken using the HttpServletRequest and HttpServletResponse. If the CsrfToken is null, it is the same as deleting it.
        Parameters:
        token - the CsrfToken to save or null to delete
        request - the HttpServletRequest to use
        response - the HttpServletResponse to use
      • loadToken

        CsrfToken loadToken​(javax.servlet.http.HttpServletRequest request)
        Loads the expected CsrfToken from the HttpServletRequest
        Parameters:
        request - the HttpServletRequest to use
        Returns:
        the CsrfToken or null if none exists