Skip to content

Commit

Permalink
Merge pull request wso2-attic#897 from chanukaranaba/IDENTITY-2737_1
Browse files Browse the repository at this point in the history
IDENTITY-2737 Code modifications
  • Loading branch information
johannnallathamby committed Sep 4, 2015
2 parents df8f645 + 9b23a09 commit b7c2c0a
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<%@page import="org.wso2.carbon.user.core.UserCoreConstants" %>
<%@page import="org.wso2.carbon.utils.ServerConstants" %>
<%@ page import="java.util.ResourceBundle" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>

<%
String serverURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
Expand Down Expand Up @@ -260,13 +261,17 @@
} else {
ClaimAttributeDTO[] attrMap = claims[j].getMappedAttributes();
if (attrMap != null) {
String val = "";
StringBuilder mappedAttributeWithDomain = new StringBuilder();
for (int x = 0; x < attrMap.length; x++) {
val += "; " + attrMap[x].getDomainName() + "/" + attrMap[x].getAttributeName();
mappedAttributeWithDomain.append(";");
mappedAttributeWithDomain.append(attrMap[x].getDomainName());
mappedAttributeWithDomain.append("/");
mappedAttributeWithDomain.append(attrMap[x].getAttributeName());
}
if (!val.isEmpty()) {
val = val.substring(1);
claims[j].setMappedAttribute(val);
String mappedAttribute = mappedAttributeWithDomain.toString();
if (StringUtils.isNotEmpty(mappedAttribute)) {
mappedAttribute = mappedAttribute.substring(1);
claims[j].setMappedAttribute(mappedAttribute);
}
}
}
Expand Down

0 comments on commit b7c2c0a

Please sign in to comment.