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.

ConstantFunction

shibboleth.Functions.Constant constructs a Function that returns its input argument. It adapts a fixed configuration value into a Function object.

shibboleth.BiFunctions.Constant 4.1 constructs a BiFunction that returns its input argument. It adapts a fixed configuration value into a BiFunction object.

They are abstract beans so require a single constructor argument, which will always be returned when the function is called.

Because of Spring's byzantine type conversion behavior, it's usually best to supply a bean of a specific type as an argument to ensure that the function returns exactly what's intended.

Example

<bean parent="shibboleth.Functions.Constant"> <constructor-arg> <!-- Fully define the bean to return from the function here. --> <bean class="...." /> </constructor-arg> </bean>