ExpressionBiPredicate

The predicate bean named shibboleth.BiConditions.Expression executes a Spring Expression Language (SpEL) expression against arbitrary inputs to produce a true/false result.

An Expression Predicate is instantiated by simply supplying a string argument that contains a SpEL expression.

Example

<bean id="MyCondition" parent="shibboleth.BiConditions.Expression" c:expression="#input1 + #input2 < 10" />

Reference

The following additional bean properties are available:

Name

Type

Default

Description

Name

Type

Default

Description

customObject

Bean/Reference



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

inputTypes

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



Allows type checking of inputs

returnOnError

boolean

false

What to return if the expression fails

The expression context will have the following variables populated:

  • input1 - the first input

  • input2 - the second input

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