Improve resolving logic
@@ -360,8 +360,15 @@ public class IdentityProviderManager implements IdpManager {
}
propertiesList = new ArrayList<Property>();
- Property idPEntityIdProp = resolveFedAuthnProperty(oauth2TokenEPUrl, oidcFedAuthn,
+ Property idPEntityIdProp;
+ // When the tenant qualified urls are enabled, we need to see the oauth2 token endpoint.
+ if (IdentityTenantUtil.isTenantQualifiedUrlsEnabled()) {
+ idPEntityIdProp = resolveFedAuthnProperty(oauth2TokenEPUrl, oidcFedAuthn,
+ OPENID_IDP_ENTITY_ID);
+ } else {
+ idPEntityIdProp = resolveFedAuthnProperty(getOIDCResidentIdPEntityId(), oidcFedAuthn,
OPENID_IDP_ENTITY_ID);
+ }
propertiesList.add(idPEntityIdProp);
Property authzUrlProp = resolveFedAuthnProperty(oauth2AuthzEPUrl, oidcFedAuthn,
