Class StoredPersistentIdDecoder
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.saml.nameid.impl.StoredPersistentIdDecoder
- All Implemented Interfaces:
NameIDDecoder
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
public class StoredPersistentIdDecoder
extends AbstractIdentifiableInitializableComponent
implements NameIDDecoder
An abstract decoder which contains the logic to decode SAML persistent IDs that are managed with a
DurablePairwiseIdStore
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DataSource
A DataSource to auto-provision aJDBCPairwiseIdStore
instance.private final org.slf4j.Logger
Class logger.private DurablePairwiseIdStore
Updated version of persistent identifier data store layer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode
(SubjectCanonicalizationContext c14nContext, NameID nameID) Decode the providedNameID
.protected void
void
setDataSource
(DataSource source) Set a data source to inject into an auto-provisioned instance ofJDBCPairwiseIdStore
to use as the store.void
Set aDurablePairwiseIdStore
to use.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, doDestroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
pidStore
Updated version of persistent identifier data store layer. -
dataSource
A DataSource to auto-provision aJDBCPairwiseIdStore
instance.
-
-
Constructor Details
-
StoredPersistentIdDecoder
public StoredPersistentIdDecoder()
-
-
Method Details
-
setPersistentIdStore
Set aDurablePairwiseIdStore
to use.- Parameters:
store
- the id store
-
setDataSource
Set a data source to inject into an auto-provisioned instance ofJDBCPairwiseIdStore
to use as the store.- Parameters:
source
- data source
-
doInitialize
- Overrides:
doInitialize
in classAbstractIdentifiedInitializableComponent
- Throws:
ComponentInitializationException
-
decode
@Nonnull @NotEmpty public String decode(@Nonnull SubjectCanonicalizationContext c14nContext, @Nonnull NameID nameID) throws NameDecoderException Decode the providedNameID
.If the object is incompatible with the decoder in some way, a null is returned.
- Specified by:
decode
in interfaceNameIDDecoder
- Parameters:
c14nContext
- the active c14n contextnameID
- the object to decode- Returns:
- the principal decoded from the value, or null
- Throws:
NameDecoderException
- if an error occurred during translation
-