Class CsrfPreventionFilter.CsrfResponseWrapper

    • Constructor Detail

      • CsrfResponseWrapper

        public CsrfResponseWrapper​(HttpServletRequest request,
                                   HttpServletResponse response,
                                   java.lang.String nonceRequestParameterName,
                                   java.lang.String nonce,
                                   java.util.Collection<java.util.function.Predicate<java.lang.String>> noNoncePatterns)
        Construct a new CsrfResponseWrapper.
        Parameters:
        request - The associated request
        response - The wrapped response
        nonceRequestParameterName - The name of the nonce request parameter
        nonce - The current nonce value
        noNoncePatterns - The patterns for URLs that should not have nonces added
    • Method Detail

      • removeQueryParameters

        public static java.lang.String removeQueryParameters​(java.lang.String url,
                                                             java.lang.String parameterName)
        Removes zero or more query parameters from a URL. All instances of the query parameter and any associated values will be removed.
        Parameters:
        url - The URL whose query parameters should be removed.
        parameterName - The name of the parameter to remove.
        Returns:
        The URL without any instances of the query parameter parameterName present.