Class AbstractNameIDPolicyPredicate
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.saml.common.profile.logic.AbstractNameIDPolicyPredicate
- All Implemented Interfaces:
Predicate<ProfileRequestContext>,Component,DestructableComponent,InitializableComponent
- Direct Known Subclasses:
DefaultNameIDPolicyPredicate
public abstract class AbstractNameIDPolicyPredicate
extends AbstractInitializableComponent
implements Predicate<ProfileRequestContext>
Base class for implementations of
Predicate that handle evaluation of name identifier content in various
scenarios.-
Field Summary
FieldsModifier and TypeFieldDescriptionFormats to apply policy to.private final org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,SAMLObject> Object lookup function.private Function<ProfileRequestContext,String> Requester ID lookup function.private Function<ProfileRequestContext,String> Responder ID lookup function. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleandoApply(String requesterId, String responderId, String format, String nameQualifier, String spNameQualifier) Apply the predicate to the request.private booleandoApply(ProfileRequestContext input, NameIdentifier target) Apply policy to the target object.private booleandoApply(ProfileRequestContext input, NameID target) Apply policy to the target object.private booleandoApply(ProfileRequestContext input, NameIDPolicy target) Apply policy to the target object.protected voidvoidsetFormats(Collection<String> newFormats) Set the formats to apply the predicate to.voidSet the lookup strategy used to locate the object to evaluate.voidSet the strategy used to locate the requester ID.voidSet the strategy used to locate the responder ID.booleantest(ProfileRequestContext input) Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
requesterIdLookupStrategy
Requester ID lookup function. -
responderIdLookupStrategy
Responder ID lookup function. -
objectLookupStrategy
Object lookup function. -
formats
Formats to apply policy to.
-
-
Constructor Details
-
AbstractNameIDPolicyPredicate
public AbstractNameIDPolicyPredicate()Constructor.
-
-
Method Details
-
setRequesterIdLookupStrategy
Set the strategy used to locate the requester ID.- Parameters:
strategy- lookup strategy
-
setResponderIdLookupStrategy
Set the strategy used to locate the responder ID.- Parameters:
strategy- lookup strategy
-
setObjectLookupStrategy
Set the lookup strategy used to locate the object to evaluate.- Parameters:
strategy- lookup function
-
setFormats
Set the formats to apply the predicate to.- Parameters:
newFormats- formats to apply predicate to
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
test
- Specified by:
testin interfacePredicate<ProfileRequestContext>
-
doApply
Apply policy to the target object.- Parameters:
input- current profile request contexttarget- target object- Returns:
- result of policy
-
doApply
Apply policy to the target object.- Parameters:
input- current profile request contexttarget- target object- Returns:
- result of policy
-
doApply
Apply policy to the target object.- Parameters:
input- current profile request contexttarget- target object- Returns:
- result of policy
-
doApply
protected abstract boolean doApply(@Nullable String requesterId, @Nullable String responderId, @Nullable String format, @Nullable String nameQualifier, @Nullable String spNameQualifier) Apply the predicate to the request.- Parameters:
requesterId- the requesterresponderId- the responderformat- format of identifiernameQualifier- the NameQualifierspNameQualifier- the SPNameQualifier- Returns:
- true iff the combination of inputs satisfies a policy
-