Class ChainingSubjectResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.attribute.resolver.dc.saml.plugin.impl.ChainingSubjectResolver
- All Implemented Interfaces:
SubjectResolver,Component,DestructableComponent,InitializableComponent
public class ChainingSubjectResolver
extends AbstractInitializableComponent
implements SubjectResolver
An implementation of
SubjectResolver which implements a chain-of-responsibility pattern
using a list of configured resolvers.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerLogger.private List<SubjectResolver>List of chain members. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGet the list of chain members.resolve(AttributeResolutionContext resolutionContext, Map<String, List<IdPAttributeValue>> dependencyAttributes, AttributeAuthorityDescriptor roleDescriptor) Resolve theSubjectto use in query.voidsetResolvers(List<SubjectResolver> chain) Set the list of chain members.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 logLogger. -
resolvers
List of chain members.
-
-
Constructor Details
-
ChainingSubjectResolver
public ChainingSubjectResolver()
-
-
Method Details
-
getResolvers
Get the list of chain members.- Returns:
- the list of chain members
-
setResolvers
Set the list of chain members.- Parameters:
chain- the chain of members
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
resolve
@Nullable public Subject resolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String, List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor) throws ResolutionExceptionResolve theSubjectto use in query.- Specified by:
resolvein interfaceSubjectResolver- Parameters:
resolutionContext- the attribute resolution context in effect for the querydependencyAttributes- the dependency attributes in effect for the queryroleDescriptor- the attribute authority role descriptor for the query- Returns:
- the subject, may be null
- Throws:
ResolutionException- if there is a fatal error during processing
-