diff --git a/components/org.wso2.carbon.identity.authz.valve/pom.xml b/components/org.wso2.carbon.identity.authz.valve/pom.xml
index e074f872..48374d6c 100644
--- a/components/org.wso2.carbon.identity.authz.valve/pom.xml
+++ b/components/org.wso2.carbon.identity.authz.valve/pom.xml
@@ -62,6 +62,10 @@
org.wso2.carbon.identity.organization.management
org.wso2.carbon.identity.organization.management.authz.service
+
+ org.wso2.carbon.identity.organization.management.core
+ org.wso2.carbon.identity.organization.management.service
+
@@ -90,7 +94,8 @@
org.wso2.carbon.identity.core.*; version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.authz.service.*;version="${org.wso2.carbon.identity.authz.service.version.range}",
org.apache.catalina.*;version="1.7.0",
- org.wso2.carbon.identity.organization.management.authz.service; version="${org.wso2.carbon.identity.organization.management.version.range}"
+ org.wso2.carbon.identity.organization.management.authz.service; version="${org.wso2.carbon.identity.organization.management.version.range}",
+ org.wso2.carbon.identity.organization.management.service.constant; version="${org.wso2.carbon.identity.organization.management.core.version.range}"
!org.wso2.carbon.identity.authz.valve.internal,
org.wso2.carbon.identity.authz.valve.*;
diff --git a/components/org.wso2.carbon.identity.authz.valve/src/main/java/org/wso2/carbon/identity/authz/valve/AuthorizationValve.java b/components/org.wso2.carbon.identity.authz.valve/src/main/java/org/wso2/carbon/identity/authz/valve/AuthorizationValve.java
index e5af2ee7..5d925b40 100644
--- a/components/org.wso2.carbon.identity.authz.valve/src/main/java/org/wso2/carbon/identity/authz/valve/AuthorizationValve.java
+++ b/components/org.wso2.carbon.identity.authz.valve/src/main/java/org/wso2/carbon/identity/authz/valve/AuthorizationValve.java
@@ -41,7 +41,9 @@
import org.wso2.carbon.identity.authz.service.exception.AuthzServiceServerException;
import org.wso2.carbon.identity.authz.valve.internal.AuthorizationValveServiceHolder;
import org.wso2.carbon.identity.authz.valve.util.Utils;
+import org.wso2.carbon.identity.core.util.IdentityUtil;
import org.wso2.carbon.identity.organization.management.authz.service.OrganizationManagementAuthorizationContext;
+import org.wso2.carbon.identity.organization.management.service.constant.OrganizationManagementConstants;
import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
@@ -170,6 +172,8 @@ public void invoke(Request request, Response response) throws IOException, Servl
getNext().invoke(request, response);
} finally {
PrivilegedCarbonContext.endTenantFlow();
+ IdentityUtil.threadLocalProperties.get()
+ .remove(OrganizationManagementConstants.ROOT_TENANT_DOMAIN);
}
} else {
getNext().invoke(request, response);
@@ -300,6 +304,8 @@ private boolean isAuthorizationSkipped(String authHandlerName, String requestUri
private void startOrganizationBoundTenantFlow(String authorizedOrganization) {
+ String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+ IdentityUtil.threadLocalProperties.get().put(OrganizationManagementConstants.ROOT_TENANT_DOMAIN, tenantDomain);
String userId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserId();
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
String userResidentOrganizationId = PrivilegedCarbonContext.getThreadLocalCarbonContext()
diff --git a/pom.xml b/pom.xml
index b6533104..ff1e1d5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -356,7 +356,7 @@
[1.0.0, 2.0.0)
- 1.0.17
+ 1.0.85
[1.0.0, 2.0.0)