Class PairwiseIdDataConnector
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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 StringID of the attribute generated by this data connector.private final org.slf4j.LoggerClass logger.private PairwiseIdStoreSource of IDs.private StringInformation 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 voidDo the dance with dependencies.protected voidprotected 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 StringresolveSourceAttribute(AttributeResolverWorkContext workContext) Helper function to locate the source Attribute in the dependencies.voidsetGeneratedAttributeId(String newAttributeId) Set the ID of the attribute generated by this connector.voidSet the underlying pairwise ID store.Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelayMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setPropagateResolutionExceptionsMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.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. -
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:
doInitializein 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 @Unmodifiable @NotLive 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
-
encodeAsAttribute
Encode the provided string.- Parameters:
value- the value to encode or null if that failed- Returns:
- null or the attribute.
-