[keycloak-user] Script Mapper
Mark Hunt
imperimus_2k at hotmail.com
Fri Sep 14 06:18:53 EDT 2018
Hi,
I am looking to filter groups into a claim but I am a little stuck as to how to use the script mapper. I have got the script below and I am happy with writing the mechanism to filter the groups by names. The bit I can’t seem to find any information is how I return the data for the claim either as an array or a string.
var groups = user.getGroups();
groups.forEach(function(entry) {
var gName = entry.getName();
print(entry);
print(gName);
});
print(groups);
Regards
Mark
More information about the keycloak-user
mailing list