public static boolean isTokenAuthenticationMethodSupportedFor(final CallContext callContext,
                                                                  final OAuthRegisteredService registeredService,
                                                                  final OAuth20ClientAuthenticationMethods... authenticationMethod) {
        return !OAuth20Utils.isAccessTokenRequest(callContext.webContext())
            || StringUtils.isBlank(registeredService.getTokenEndpointAuthenticationMethod())
            || Arrays.stream(authenticationMethod).anyMatch(method -> StringUtils.equalsIgnoreCase(registeredService.getTokenEndpointAuthenticationMethod(), method.getType()));
    }
Is token authentication method supported for service.

@param callContext          the call context
@param registeredService    the registered service
@param authenticationMethod the authentication method
@return true/false
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java