From c66557fafd4f90149016fc4c020d1398f0ec7349 Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Sat, 10 Feb 2024 14:24:32 +0530 Subject: [PATCH] Fix returning identityProviderMappedUserRoles in federated user logins in SAML apps --- .../saml/builders/assertion/DefaultSAMLAssertionBuilder.java | 2 ++ pom.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/builders/assertion/DefaultSAMLAssertionBuilder.java b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/builders/assertion/DefaultSAMLAssertionBuilder.java index b4849c7d4..caa2dcae7 100644 --- a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/builders/assertion/DefaultSAMLAssertionBuilder.java +++ b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/builders/assertion/DefaultSAMLAssertionBuilder.java @@ -55,6 +55,7 @@ import org.opensaml.core.xml.schema.XSString; import org.opensaml.core.xml.schema.impl.XSStringBuilder; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationContextProperty; +import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants; import org.wso2.carbon.identity.application.common.util.IdentityApplicationConstants; import org.wso2.carbon.identity.base.IdentityConstants; import org.wso2.carbon.identity.base.IdentityException; @@ -342,6 +343,7 @@ protected AttributeStatement buildAttributeStatement(Map claims) userAttributeSeparator = claimSeparator; } claims.remove(IdentityCoreConstants.MULTI_ATTRIBUTE_SEPARATOR); + claims.remove(FrameworkConstants.IDP_MAPPED_USER_ROLES); AttributeStatement attStmt = new AttributeStatementBuilder().buildObject(); Iterator> iterator = claims.entrySet().iterator(); diff --git a/pom.xml b/pom.xml index 7009a0b0e..cb05269d2 100644 --- a/pom.xml +++ b/pom.xml @@ -457,7 +457,7 @@ 4.9.23 4.9.0 - 5.25.507 + 7.0.40 [5.25.260, 8.0.0) 1.0.0