Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tenant resolving with tenant qualified URL enabled. #406

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private String getLoggedInTenantDomainFromEvent(Event event) {
}

if (StringUtils.isBlank(loggedInTenantDomain)) {
loggedInTenantDomain = IdentityTenantUtil.getTenantDomainFromContext();
loggedInTenantDomain = IdentityTenantUtil.resolveTenantDomain();
}
return loggedInTenantDomain;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public SAMLSSOReqValidationResponseDTO invalidateSession(String sessionId) throw

String loginTenantDomain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
if (IdentityTenantUtil.isTenantedSessionsEnabled()) {
loginTenantDomain = IdentityTenantUtil.getTenantDomainFromContext();
loginTenantDomain = IdentityTenantUtil.resolveTenantDomain();
}
SPInitLogoutRequestProcessor logoutReqProcessor = SAMLSSOUtil.getSPInitLogoutRequestProcessor();
return logoutReqProcessor.process(null, sessionId, null, loginTenantDomain);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private String getLoggedInTenantDomain() {
if (!IdentityTenantUtil.isTenantedSessionsEnabled()) {
return getTenantDomain();
}
return IdentityTenantUtil.getTenantDomainFromContext();
return IdentityTenantUtil.resolveTenantDomain();
}

private Optional<AuthenticatedUser> getLoggedInUser(String tenantDomain) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void handleRequest(HttpServletRequest req, HttpServletResponse resp, boo

String tenantDomain = null;
if (IdentityTenantUtil.isTenantQualifiedUrlsEnabled()) {
tenantDomain = IdentityTenantUtil.getTenantDomainFromContext();
tenantDomain = IdentityTenantUtil.resolveTenantDomain();
if (log.isDebugEnabled()) {
log.debug("Tenant domain from context: " + tenantDomain);
}
Expand Down Expand Up @@ -2243,7 +2243,7 @@ private String getLoggedInTenantDomain(HttpServletRequest req) {

String loggedInTenantDomain = req.getParameter(FrameworkConstants.RequestParams.LOGIN_TENANT_DOMAIN);
if (StringUtils.isBlank(loggedInTenantDomain)) {
return IdentityTenantUtil.getTenantDomainFromContext();
return IdentityTenantUtil.resolveTenantDomain();
}
return loggedInTenantDomain;
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
<properties>
<carbon.kernel.version>4.9.10</carbon.kernel.version>
<carbon.kernel.feature.version>4.9.0</carbon.kernel.feature.version>
<carbon.identity.framework.version>5.25.305</carbon.identity.framework.version>
<carbon.identity.framework.version>5.25.380</carbon.identity.framework.version>
<carbon.identity.framework.imp.pkg.version.range>[5.25.260, 7.0.0)
</carbon.identity.framework.imp.pkg.version.range>
<carbon.identity.organization.management.core.version>1.0.0</carbon.identity.organization.management.core.version>
Expand Down
Loading