attribute resolver script
Tom Poage
tfpoage at ucdavis.edu
Tue Nov 22 13:09:01 EST 2016
IdP 3.3.0
After reading arguments for using Mapped over Script in AttributeDefinition, I tried:
<resolver:AttributeDefinition xsi:type="ad:Mapped" id=“foo" sourceAttributeID=“eduPersonAffiliation">
<resolver:Dependency ref=“ourLDAP" />
<resolver:AttributeEncoder . . . />
<ad:DefaultValue passThru="false" />
<ad:ValueMap>
<ad:ReturnValue>X</ad:ReturnValue>
<ad:SourceValue>staff</ad:SourceValue>
</ad:ValueMap>
<ad:ValueMap>
<ad:ReturnValue>Y</ad:ReturnValue>
<ad:SourceValue>.+</ad:SourceValue>
</ad:ValueMap>
</resolver:AttributeDefinition>
I expected this to work like a CASE statement, but it returns both values (X and Y).
On one hand I can see why it might. Do I need Script to perform staff => X, any-other-value => Y, else empty?
Thanks.
Tom.
On Nov 9, 2016, at 6:44 AM, Peter Schober <peter.schober at UNIVIE.AC.AT<mailto:peter.schober at UNIVIE.AC.AT>> wrote:
* Michael Dahlberg <olgamirth at gmail.com<mailto:olgamirth at gmail.com>> [2016-11-09 15:34]:
Any suggestions on why/when you would choose a mapped attribute over
a scripted attribute?
I'd chose any other method over scripted, if there are alternatives.
* configuration > programming
(though maybe Scott's comments about Mapped specifically should be
taken to mean there might be exceptions)
* no issues wrt Java and scripting engine version (Rhino vs. Nashorn)
(or adding and updating scripting engines for other languagues,
e.g. JPython)
* performance, at least theoretically
-peter
--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net<mailto:users-unsubscribe at shibboleth.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20161122/95faf40a/attachment-0001.html>
More information about the users
mailing list