From 6f10ef50e2206c6d9f13e197b580d5c17e5bdf77 Mon Sep 17 00:00:00 2001 From: Hasini Samarathunga Date: Tue, 29 Oct 2024 11:03:30 +0530 Subject: [PATCH] Inherit APIBasedAuthenticationEnabled property from parent application to the shared application --- .../management/application/OrgApplicationManagerImpl.java | 2 ++ .../application/listener/FragmentApplicationMgtListener.java | 1 + 2 files changed, 3 insertions(+) diff --git a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java index f65434de2..8383d1750 100644 --- a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java +++ b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java @@ -902,6 +902,8 @@ private ServiceProvider prepareSharedApplication(ServiceProvider mainApplication delegatedApplication.setApplicationName(oAuthConsumerApp.getApplicationName()); delegatedApplication.setDescription(mainApplication.getDescription()); delegatedApplication.setInboundAuthenticationConfig(inboundAuthConfig); + delegatedApplication.setAPIBasedAuthenticationEnabled(mainApplication.isAPIBasedAuthenticationEnabled()); + if (ApplicationMgtUtil.isConsole(mainApplication.getApplicationName())) { delegatedApplication.setAccessUrl(resolveAccessURL(mainApplication.getTenantDomain(), sharedOrgId, FrameworkConstants.Application.CONSOLE_APP_PATH)); diff --git a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/listener/FragmentApplicationMgtListener.java b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/listener/FragmentApplicationMgtListener.java index 23d081e3b..283b1294b 100644 --- a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/listener/FragmentApplicationMgtListener.java +++ b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/listener/FragmentApplicationMgtListener.java @@ -360,6 +360,7 @@ private void inheritAPIBasedAuthenticationEnabledProperty(ServiceProvider mainAp } } sharedApplication.setSpProperties(properties); + sharedApplication.setAPIBasedAuthenticationEnabled(mainApplication.isAPIBasedAuthenticationEnabled()); } }