public static OAuthRegisteredService getRegisteredOAuthServiceByRedirectUri(final ServicesManager servicesManager,
                                                                                final String redirectUri) {
        validateRedirectUri(redirectUri);
        return FunctionUtils.doIfNotBlank(redirectUri,
            () -> getRegisteredOAuthServiceByPredicate(servicesManager, service -> service.matches(redirectUri)),
            () -> null);
    }
Gets registered oauth service by redirect uri.

@param servicesManager the services manager
@param redirectUri     the redirect uri
@return the registered OAuth service by redirect uri
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java