public static boolean isResponseType(final String type, final OAuth20ResponseTypes expectedType) {
        return expectedType.getType().equalsIgnoreCase(type);
    }
Check the response type against an expected response type.

@param type         the given response type
@param expectedType the expected response type
@return whether the response type is the expected one
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java