Class SubjectDataConnector
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<Map<String,IdPAttribute>>
net.shibboleth.idp.attribute.resolver.AbstractDataConnector
net.shibboleth.idp.attribute.resolver.dc.impl.SubjectDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
A
DataConnector
that extracts all
IdPAttributePrincipal
objects from the Subject
objects associated
with the request.- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Flag denoting whether plugin is being used for subject c14n or standard usage.private final org.slf4j.Logger
Class logger.private boolean
Controls handling of empty results.private Function<ProfileRequestContext,
SubjectContext> Strategy used to locate theSubjectContext
to use.private Function<ProfileRequestContext,
Subject> Strategy used to locate theSubject
to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,
IdPAttribute> doDataConnectorResolve
(AttributeResolutionContext resolutionContext, AttributeResolverWorkContext workContext) Retrieves a collection of attributes from some data source.protected void
boolean
Gets whether the connector is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.boolean
Gets whether obtaining no results should be treated as an error.void
setForCanonicalization
(boolean flag) Sets whether the connector is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.void
setNoResultIsError
(boolean flag) Sets whether obtaining no results should be treated as an error.void
Sets the strategy used to locate theSubjectContext
associated with a givenAttributeResolutionContext
.void
Sets the strategy used to locate aSubject
associated with a givenAttributeResolutionContext
.Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setPropagateResolutionExceptions, setSuppressDisplayInformation
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
forCanonicalization
private boolean forCanonicalizationFlag denoting whether plugin is being used for subject c14n or standard usage. -
scLookupStrategy
Strategy used to locate theSubjectContext
to use. -
subjectLookupStrategy
Strategy used to locate theSubject
to use. -
noResultIsError
private boolean noResultIsErrorControls handling of empty results.
-
-
Constructor Details
-
SubjectDataConnector
public SubjectDataConnector()Constructor.
-
-
Method Details
-
isForCanonicalization
public boolean isForCanonicalization()Gets whether the connector is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.- Returns:
- whether connector is being used during c14n
-
setForCanonicalization
public void setForCanonicalization(boolean flag) Sets whether the connector is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.Defaults to false.
- Parameters:
flag
- flag to set
-
setSubjectContextLookupStrategy
public void setSubjectContextLookupStrategy(@Nonnull Function<ProfileRequestContext, SubjectContext> strategy) Sets the strategy used to locate theSubjectContext
associated with a givenAttributeResolutionContext
.- Parameters:
strategy
- lookup strategy
-
setSubjectLookupStrategy
Sets the strategy used to locate aSubject
associated with a givenAttributeResolutionContext
.- Parameters:
strategy
- strategy used to locate aSubject
associated with a givenAttributeResolutionContext
-
isNoResultIsError
public boolean isNoResultIsError()Gets whether obtaining no results should be treated as an error.- Returns:
- whether obtaining no results should be treated as an error
-
setNoResultIsError
public void setNoResultIsError(boolean flag) Sets whether obtaining no results should be treated as an error.Defaults to false.
- Parameters:
flag
- flag to set
-
doInitialize
- Overrides:
doInitialize
in classAbstractDataConnector
- Throws:
ComponentInitializationException
-
doDataConnectorResolve
@Nonnull protected Map<String,IdPAttribute> doDataConnectorResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException Retrieves a collection of attributes from some data source.- Specified by:
doDataConnectorResolve
in classAbstractDataConnector
- Parameters:
resolutionContext
- current resolution contextworkContext
- current resolver work context- Returns:
- collected attributes indexed by attribute ID
- Throws:
ResolutionException
- thrown if there is a problem resolving the attributes
-