@Override
    public Pair<String, String> resolveClientIdAndClientSecret(final CallContext callContext) {
        val extractor = new BasicAuthExtractor();
        val upcResult = extractor.extract(callContext);
        if (upcResult.isPresent()) {
            val upc = (UsernamePasswordCredentials) upcResult.get();
            return Pair.of(upc.getUsername(), upc.getPassword());
        }
        val clientId = resolveRequestParameter(callContext.webContext(), OAuth20Constants.CLIENT_ID)
            .map(String::valueOf).orElse(StringUtils.EMPTY);
        val clientSecret = resolveRequestParameter(callContext.webContext(), OAuth20Constants.CLIENT_SECRET)
            .map(String::valueOf).orElse(StringUtils.EMPTY);
        return Pair.of(clientId, clientSecret);
    }
This is {@link DefaultOAuth20RequestParameterResolver}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/DefaultOAuth20RequestParameterResolver.java