The predicate named
shibboleth.Conditions.Scripted uses a JSR-223 script to provide return value.
Is an activation condition, which means that is can be automatically configured as an activation condition, this also means it can also configured anywhere that a ProfileRequestContext is supplied as input.
Scripted Predicated are instantiated by one of two factory methods.
If provided with one parameter, this is the script to be executed. If two parameters are the provided, the the first is the name of the (installed) JSR-223 lanuage and the second is the script
<bean id="MyCondition" parent="shibboleth.Conditions.Scripted" factory-method="inlineScript" p:customObject-ref="my.custom.object" hideExceptions="true">
<![CDATA[ Put Your Script here
If provided with one parameter this is the location (usually the file name) of the resource (file) containing the script. If two parameters are the provided, the the first is the name of the (installed) JSR-223 lanuage and the second is the script.
<bean id="MyCondition" parent="shibboleth.Conditions.Scripted" factory-method="resourceScript" c:_0="\opt\idp\path\to\script.js" c:_1="js" />
The following properties are available:
|bean||null||The name of the object to be made available to the script with the identifier |
|boolean||false||What to return if the script fails|
|boolean||false||if true then "|
returnOnError" is retuned if the script throws and exception, otherwise the exception is passed up
The script has two variable predeclared for it: