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 booleanFlag denoting whether plugin is being used for subject c14n or standard usage.private final org.slf4j.LoggerClass logger.private booleanControls handling of empty results.private Function<ProfileRequestContext,SubjectContext> Strategy used to locate theSubjectContextto use.private Function<ProfileRequestContext,Subject> Strategy used to locate theSubjectto 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 voidbooleanGets whether the connector is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.booleanGets whether obtaining no results should be treated as an error.voidsetForCanonicalization(boolean flag) Sets whether the connector is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.voidsetNoResultIsError(boolean flag) Sets whether obtaining no results should be treated as an error.voidSets the strategy used to locate theSubjectContextassociated with a givenAttributeResolutionContext.voidSets the strategy used to locate aSubjectassociated 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, setNoRetryDelayMethods 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, setSuppressDisplayInformationMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getIdMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitializedMethods 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 theSubjectContextto use. -
subjectLookupStrategy
Strategy used to locate theSubjectto 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 theSubjectContextassociated with a givenAttributeResolutionContext.- Parameters:
strategy- lookup strategy
-
setSubjectLookupStrategy
Sets the strategy used to locate aSubjectassociated with a givenAttributeResolutionContext.- Parameters:
strategy- strategy used to locate aSubjectassociated 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:
doInitializein 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:
doDataConnectorResolvein 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
-