protected boolean supportsInternal(final RegisteredService registeredService, final Service givenService) {
        val attributes = givenService.getAttributes();
        if (attributes.containsKey(OAuth20Constants.CLIENT_ID)) {
            val service = (WebApplicationService) givenService;
            val source = CollectionUtils.firstElement(attributes.get(service.getSource()))
                .map(String.class::cast)
                .orElse(StringUtils.EMPTY);
            val callbackService = OAuth20Utils.casOAuthCallbackUrl(casProperties.getServer().getPrefix());
            return StringUtils.isBlank(source) || StringUtils.startsWith(source, callbackService)
                || OAuth20Utils.checkCallbackValid(registeredService, source);
        }
        return false;
    }
This is {@link OAuth20ServicesManagerRegisteredServiceLocator}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/services/OAuth20ServicesManagerRegisteredServiceLocator.java