@Override
    public Optional<OidcRegisteredService> resolveTrustChains(final String id) throws Exception {
        if (StringUtils.startsWithIgnoreCase(id, "http")) {
            val entityId = new EntityID(id);
            for (val trustChainResolver : trustChainResolvers) {
                val rpMetadataResult = fetchRelyingPartyMetadata(trustChainResolver, entityId);
                if (rpMetadataResult.isPresent()) {
                    val rpMetadata = rpMetadataResult.get();
                    val oidcRegisteredService = extractRegisteredService(entityId, rpMetadata);
                    return Optional.ofNullable(oidcRegisteredService);
                }
            }
        }
        return Optional.empty();
    }
This is {@link OidcFederationDefaultTrustChainResolver}.

@author Misagh Moayyed
@since 7.3.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/federation/OidcFederationDefaultTrustChainResolver.java