[KEYCLOAK-1492] Fix mapClaim when nested attribute already exists

This commit is contained in:
Dane Barentine 2015-06-22 10:46:12 -07:00
parent facf701897
commit 8da532da93

View file

@ -63,11 +63,13 @@ public class OIDCAttributeMapperHelper {
jsonObject.put(split[i], attributeValue); jsonObject.put(split[i], attributeValue);
} else { } else {
Map<String, Object> nested = (Map<String, Object>)jsonObject.get(split[i]); Map<String, Object> nested = (Map<String, Object>)jsonObject.get(split[i]);
if (nested == null) { if (nested == null) {
nested = new HashMap<String, Object>(); nested = new HashMap<String, Object>();
jsonObject.put(split[i], nested); jsonObject.put(split[i], nested);
jsonObject = nested;
} }
jsonObject = nested;
} }
} }
} }