Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<bean id="MyFunction" parent="shibboleth.Functions.Expression"
	c:expression="#input + 42" />

Reference

Localtabgroup
Localtab live
activetrue
Expand
titleBean Properties

The The following additional bean properties are available:

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

inputType

(Function variant)

Class<?>

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

inputTypes

(BiFunction variant)

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

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

outputType

Class<?>

Adds type checking against the output of the function to enforce type safety

localtab-live
Expand
titleExpression Context

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

  • input - the function input

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

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

  • input1 - the first function input

  • input2 - the second function input

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

...