ExpressionContextFunction

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

PropertyName

Type

Default

Description

customObject

Bean/Reference



An object to make available to the script via a variable named custom

returnOnError

Object

null

What to return if the expression fails

hideExceptions

boolean

false

If true, then the returnOnError value is returned if the expression raises an exception, otherwise the exception is passed out

outputType

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 input

  • custom - the object set via the customObject property, if any