Class DefaultLocalErrorPredicate
- java.lang.Object
-
- org.opensaml.saml.common.profile.logic.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 Summary
Fields Modifier and Type Field Description private Function<org.opensaml.profile.context.ProfileRequestContext,SAMLBindingContext>
bindingContextLookupStrategy
Strategy function for access toSAMLBindingContext
to check.private Function<org.opensaml.profile.context.ProfileRequestContext,SAMLEndpointContext>
endpointContextLookupStrategy
Strategy function for access toSAMLEndpointContext
to check.private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.profile.context.EventContext>
eventContextLookupStrategy
Strategy function for access toEventContext
to check.private Set<String>
localEvents
Error events to handle locally, even if possible to do so with a response.private org.slf4j.Logger
log
Class logger.
-
Constructor Summary
Constructors Constructor Description DefaultLocalErrorPredicate()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setBindingContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,SAMLBindingContext> strategy)
Set lookup strategy forSAMLBindingContext
to check.void
setEndpointContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,SAMLEndpointContext> strategy)
Set lookup strategy forSAMLEndpointContext
to check.void
setEventContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.profile.context.EventContext> strategy)
Set lookup strategy forEventContext
to check.void
setLocalEvents(Collection<String> events)
Set the events to handle locally.boolean
test(org.opensaml.profile.context.ProfileRequestContext input)
-
-
-
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 toSAMLBindingContext
to check.
-
endpointContextLookupStrategy
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,SAMLEndpointContext> endpointContextLookupStrategy
Strategy function for access toSAMLEndpointContext
to check.
-
eventContextLookupStrategy
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.profile.context.EventContext> eventContextLookupStrategy
Strategy function for access toEventContext
to check.
-
-
Method Detail
-
setBindingContextLookupStrategy
public void setBindingContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,SAMLBindingContext> strategy)
Set lookup strategy forSAMLBindingContext
to check.- Parameters:
strategy
- lookup strategy
-
setEndpointContextLookupStrategy
public void setEndpointContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,SAMLEndpointContext> strategy)
Set lookup strategy forSAMLEndpointContext
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 forEventContext
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
-
-