The bean named shibboleth.ContextFunctions.Expression executes a Spring Expression Language (SpEL) expression to implement a Function operating against a ProfileRequestContext. The underlying net.shibboleth.idp.profile.context.navigate.SpringExpressionContextLookupFunction class can be used if a function operating against a different context class is required.
The Function is instantiated by supplying a string argument that contains a SpEL expression to evaluate.
Example
<bean id="MyPRCFunction" parent="shibboleth.ContextFunctions.Expression" c:expression="#input.getLoggingId()" />
Reference
Properties
The following additional bean properties are available:
PropertyName | Type | Default | Description |
---|---|---|---|
| Bean/Reference | An object to make available to the script via a variable named | |
| Object | null | What to return if the expression fails |
| boolean | false | If true, then the |
| Class<?> | Adds type checking against the output of the function to enforce type safety |
Expression Context
The expression context will have two variables populated:
input
- the function inputcustom
- the object set via thecustomObject
property, if any