The Shibboleth IdP V4 software will leave support on September 1, 2024.

ANDORPredicates

These (bi)predicates combine two or more other (bi)predicates.

shibboleth.Conditions.AND is a conjunction and returns true if all the provided Predicates return true, and short-circuits if one returns false.

shibboleth.Conditions.OR is a disjunction and returns true if any one of the provided Predicates returns true (and stops at that point).

shibboleth.BiConditions.AND 4.1 is a conjunction and returns true if all the provided BiPredicates return true, and short-circuits if one returns false.

shibboleth.BiConditions.OR 4.1 is a disjunction and returns true if any one of the provided BiPredicates returns true (and stops at that point).

These are abstract parent beans, so your version has to be appropriately constructed by supplying the arguments. They are usually constructed with a single parameter, a Spring list of (bi)predicate beans. A two-parameter constructor allows you to provide exactly two parameters via <constructor-arg> elements but that doesn't really save any XML.

Examples

The following example returns true if the relying party name is one of three possible values. Note that this is a contrived example since the shibboleth.Conditions.RelyingPartyId bean itself can take a list of candidate names, but it shows the syntax.

Match if the relying party is one of three elemets
<bean id="MyCondition" parent="shibboleth.Conditions.OR"> <constructor-arg> <list> <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://sp.example.com/shibboleth" /> <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://my.example.com/shibboleth" /> <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://another.example.com/shibboleth" /> </list> </constructor-arg> </bean>

Other examples can be found here.