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