@Override
    public boolean validate(final WebContext context) throws Throwable {
        val grantType = configurationContext.getObject().getRequestParameterResolver()
            .resolveRequestParameter(context, OAuth20Constants.GRANT_TYPE).orElse(StringUtils.EMPTY);
        if (!isGrantTypeSupported(grantType, OAuth20GrantTypes.values())) {
            LOGGER.warn("Grant type is not supported: [{}]", grantType);
            return false;
        }

        val manager = new ProfileManager(context, getConfigurationContext().getObject().getSessionStore());
        val profile = manager.getProfile();
        if (profile.isEmpty()) {
            LOGGER.warn("Could not locate authenticated profile for this request. Request is not authenticated");
            return false;
        }
        if (!validateClientSecretInRequestIfAny(context)) {
            LOGGER.warn("Cannot accept [{}] as a query parameter in the request", OAuth20Constants.CLIENT_SECRET);
            return false;
        }
        val userProfile = profile.get();
        return validateInternal(context, grantType, manager, userProfile);
    }
This is {@link BaseOAuth20TokenRequestValidator}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/validator/token/BaseOAuth20TokenRequestValidator.java