@Override
    public void init(final FilterConfig filterConfig) {
        val initParamNames = filterConfig.getInitParameterNames();
        throwIfUnrecognizedParamName(initParamNames);

        val initParamAllowMultiValuedParameters = filterConfig.getInitParameter(ALLOW_MULTI_VALUED_PARAMETERS);
        val initParamParametersToCheck = filterConfig.getInitParameter(PARAMETERS_TO_CHECK);
        val initParamOnlyPostParameters = filterConfig.getInitParameter(ONLY_POST_PARAMETERS);
        val initParamCharactersToForbid = filterConfig.getInitParameter(CHARACTERS_TO_FORBID);

        val initParamPatternToBlock = filterConfig.getInitParameter(PATTERN_TO_BLOCK);
        this.patternToBlock = StringUtils.isNotBlank(initParamPatternToBlock)
            ? RegexUtils.createPattern(initParamPatternToBlock)
            : null;

        this.allowMultiValueParameters = Boolean.parseBoolean(initParamAllowMultiValuedParameters);
        this.parametersToCheck = parseParametersList(initParamParametersToCheck, true);
        this.onlyPostParameters = parseParametersList(initParamOnlyPostParameters, false);
        this.charactersToForbid = parseCharactersToForbid(initParamCharactersToForbid);

        if (this.allowMultiValueParameters && this.charactersToForbid.isEmpty()) {
            throwException(new ServletException("Configuration to allow multi-value parameters and forbid no characters makes "
                                              + getClass().getSimpleName() + " a no-op"));
        }
    }
Check that some parameters should only be in POST requests (according to the configuration).

@param method             the method of the request
@param parameterMap       all the request parameters
@param onlyPostParameters parameters that should only be in POST requests
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/filters/RequestParameterPolicyEnforcementFilter.java