public static void checkOnlyPostParameters(final String method, final Map parameterMap, final Set<String> onlyPostParameters) {
        if (!"POST".equals(method)) {
            val names = parameterMap.keySet();
            for (val onlyPostParameter : onlyPostParameters) {
                if (names.contains(onlyPostParameter)) {
                    throwException(new IllegalArgumentException(onlyPostParameter + " parameter should only be used in POST requests"));
                }
            }
        }
    }
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