Class PairwiseIdDataConnector
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.PairwiseIdDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
A
DataConnector
that generates pairwise IDs that depend on
a seed IdPAttribute
.- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
ID of the attribute generated by this data connector.private final org.slf4j.Logger
Class logger.private PairwiseIdStore
Source of IDs.private String
Information about the dependency. -
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.private void
Do the dance with dependencies.protected void
protected Map<String,
IdPAttribute> encodeAsAttribute
(String value) Encode the provided string.Get the ID of the attribute generated by this connector.Get the underlying pairwise ID store.Get the attribute ID whose first value is being used when producing the pairwise ID.protected String
resolveSourceAttribute
(AttributeResolverWorkContext workContext) Helper function to locate the source Attribute in the dependencies.void
setGeneratedAttributeId
(String newAttributeId) Set the ID of the attribute generated by this connector.void
Set the underlying pairwise ID store.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. -
generatedAttribute
ID of the attribute generated by this data connector. -
sourceInformation
Information about the dependency. -
pidStore
Source of IDs.
-
-
Constructor Details
-
PairwiseIdDataConnector
public PairwiseIdDataConnector()
-
-
Method Details
-
getSourceAttributeInformation
Get the attribute ID whose first value is being used when producing the pairwise ID.- Returns:
- source attribute ID
-
getGeneratedAttributeId
Get the ID of the attribute generated by this connector.- Returns:
- ID of the attribute generated by this connector
-
setGeneratedAttributeId
Set the ID of the attribute generated by this connector.- Parameters:
newAttributeId
- what to set.
-
getPairwiseIdStore
Get the underlying pairwise ID store.- Returns:
- ID store
-
setPairwiseIdStore
Set the underlying pairwise ID store.- Parameters:
store
- ID store
-
doDependencyInformation
Do the dance with dependencies.- Throws:
ComponentInitializationException
- if the dependencies are not aligned correctly
-
doInitialize
- Overrides:
doInitialize
in classAbstractDataConnector
- Throws:
ComponentInitializationException
-
resolveSourceAttribute
@Nullable protected String resolveSourceAttribute(@Nonnull AttributeResolverWorkContext workContext) Helper function to locate the source Attribute in the dependencies.- Parameters:
workContext
- the context to look in- Returns:
- the value, or null in any of the failure cases.
-
doDataConnectorResolve
@Nullable 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
-
encodeAsAttribute
Encode the provided string.- Parameters:
value
- the value to encode or null if that failed- Returns:
- null or the attribute.
-