...
Code Block | ||||
---|---|---|---|---|
| ||||
<ConditionScript> <Script> <![CDATA[ "use strict"; // A trivial implementation of Predicate<EntityDescriptor> // applied to the input argument // // The input argument is of type: // org.opensaml.saml.saml2.metadata.EntityDescriptor // (function (entity) { return false; })(input)); ]]> </Script> </ConditionScript> |
...
If the customObjectRef
attribute is present on the <ConditionScript>
element, the script operates on a pair of arguments custom
and input
. The following script implements a function that always returns the same trivial implementation of Predicate<EntityDescriptor>
regardless of the custom
argument. The resulting predicate is then applied to the input
argument, which always returns false.
Code Block | ||||
---|---|---|---|---|
| ||||
<ConditionScript customObjectRef="BeanID">
<Script>
<![CDATA[
"use strict";
// A trivial implementation of Function<T, Predicate<EntityDescriptor>>,
// that is, a function that takes an argument of some unspecified type T
// and returns an implementation of Predicate<EntityDescriptor>.
// The latter is ultimately applied to the input object.
//
// The type of the custom argument depends on the application.
//
// The input argument is of type:
// org.opensaml.saml.saml2.metadata.EntityDescriptor
//
(function (t) { return function (entity) { return false; }; }(custom))(input);
]]>
</Script>
</ConditionScript>
|
...