From 2656cc2e65eee31bff0ac4d965df2f4232301359 Mon Sep 17 00:00:00 2001 From: Thisara Welmilla Date: Wed, 16 Oct 2024 15:43:44 +0530 Subject: [PATCH] Update IdentityProviderManager.java --- .../wso2/carbon/idp/mgt/IdentityProviderManager.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManager.java b/components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManager.java index 19734a66cc28..abfd25c4a7ab 100644 --- a/components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManager.java +++ b/components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManager.java @@ -2672,15 +2672,11 @@ private void resolveAuthenticatorDefinedByProperty(IdentityProvider idp, boolean } /* For existing federated authenticators, disregard any value provided in the request payload. - Instead, resolve and retrieve the 'definedBy' type of the corresponding existing authenticator. - If the authenticator config is present in the ApplicationAuthenticatorService list, return its type, - if not return USER. */ + Instead, resolve and retrieve the 'definedBy' type of the corresponding existing authenticator. */ for (FederatedAuthenticatorConfig federatedAuthConfig : idp.getFederatedAuthenticatorConfigs()) { - if (federatedAuthConfig.getDefinedByType() == null) { - FederatedAuthenticatorConfig authenticatorConfig = ApplicationAuthenticatorService.getInstance() - .getFederatedAuthenticatorByName(federatedAuthConfig.getName()); - federatedAuthConfig.setDefinedByType(authenticatorConfig.getDefinedByType()); - } + FederatedAuthenticatorConfig authenticatorConfig = ApplicationAuthenticatorService.getInstance() + .getFederatedAuthenticatorByName(federatedAuthConfig.getName()); + federatedAuthConfig.setDefinedByType(authenticatorConfig.getDefinedByType()); } } }