Making Attribute Lowercase
Cantor, Scott
cantor.2 at osu.edu
Tue Sep 26 14:59:43 EDT 2017
On 9/26/17, 1:58 PM, "users on behalf of McKean, Brandon Scott - mckeanbs" <users-bounces at shibboleth.net on behalf of mckeanbs at jmu.edu> wrote:
> But it doesn't work due to what I'm guessing is getValues not producing a string.
You don't have to guess.
https://wiki.shibboleth.net/confluence/display/IDP30/ScriptedAttributeDefinition
See link to ScriptedIdPAttribute, whose javadoc documents getValues as Collection<Object> (and which notes it's there for simplification for scripts written for V2 that assume string values are just exposed as strings).
Collection however is somewhat annoying to use because you can't index into it for simple cases but for iteration it's fine.
ScriptedIdPAttribute.getNativeAttribute is simpler sometimes, but the values are still wrapped inside typed classes so it depends on the scenario.
But fundamentally your script here isn't workable, you can't take an input attribute and start changing its values, that won't work. You need to layer a new one on top of the dependency.
-- Scott
More information about the users
mailing list