Class DefaultLocalErrorPredicate

  • All Implemented Interfaces:
    Predicate<org.opensaml.profile.context.ProfileRequestContext>, net.shibboleth.utilities.java.support.logic.Predicate<org.opensaml.profile.context.ProfileRequestContext>

    public class DefaultLocalErrorPredicate
    extends Object
    implements net.shibboleth.utilities.java.support.logic.Predicate<org.opensaml.profile.context.ProfileRequestContext>
    Predicate that decides whether to handle an error by returning a SAML response to a requester or fail locally.

    This is principally determined based on whether or not the necessary message context children are present so that a response can be delivered, but is also tunable based on the error event being handled.

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • bindingContextLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​SAMLBindingContext> bindingContextLookupStrategy
        Strategy function for access to SAMLBindingContext to check.
      • eventContextLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.profile.context.EventContext> eventContextLookupStrategy
        Strategy function for access to EventContext to check.
      • localEvents

        @Nonnull
        @NonnullElements
        private Set<String> localEvents
        Error events to handle locally, even if possible to do so with a response.
    • Constructor Detail

      • DefaultLocalErrorPredicate

        public DefaultLocalErrorPredicate()
        Constructor.
    • Method Detail

      • setBindingContextLookupStrategy

        public void setBindingContextLookupStrategy​(@Nonnull
                                                    Function<org.opensaml.profile.context.ProfileRequestContext,​SAMLBindingContext> strategy)
        Set lookup strategy for SAMLBindingContext to check.
        Parameters:
        strategy - lookup strategy
      • setEndpointContextLookupStrategy

        public void setEndpointContextLookupStrategy​(@Nonnull
                                                     Function<org.opensaml.profile.context.ProfileRequestContext,​SAMLEndpointContext> strategy)
        Set lookup strategy for SAMLEndpointContext to check.
        Parameters:
        strategy - lookup strategy
      • setEventContextLookupStrategy

        public void setEventContextLookupStrategy​(@Nonnull
                                                  Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.profile.context.EventContext> strategy)
        Set lookup strategy for EventContext to check.
        Parameters:
        strategy - lookup strategy
      • setLocalEvents

        public void setLocalEvents​(@Nullable
                                   Collection<String> events)
        Set the events to handle locally.
        Parameters:
        events - locally handled events
      • test

        public boolean test​(@Nullable
                            org.opensaml.profile.context.ProfileRequestContext input)
        Specified by:
        test in interface Predicate<org.opensaml.profile.context.ProfileRequestContext>