The Shibboleth IdP V4 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP5 wiki space for current documentation on the supported version.

ExpressionConsumer

The bean named shibboleth.Consumers.Expression 4.1 executes a Spring Expression Language (SpEL) expression to implement an arbitrary Consumer signature.

The bean named shibboleth.BiConsumers.Expression 4.1 executes a Spring Expression Language (SpEL) expression to implement an arbitrary BiConsumer signature.

An Expression Consumer is instantiated by supplying a string argument that contains a SpEL expression to evaluate.

Example

<bean id="MyConsumer" parent="shibboleth.Consumers.Expression" c:expression="#input.doSomething()" />

Reference

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

hideExceptions

boolean

false

If true, then any exception raised is masked

inputType

(Consumer variant)

Class<?>



Adds type checking against the input to the consumer to enforce type safety

inputTypes

(BiConsumer variant)

Pair<Class<?>,Class<?>>



Adds type checking against the input to the consumer to enforce type safety

For the Consumer variant, the expression environment will have these variables populated:

  • input - the input

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

For the BiConsumer variant, the expression environment will have these variables populated:

  • input1 - the first input

  • input2 - the second input

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

Â