Package net.shibboleth.idp.saml.nameid.impl

# Class StoredPersistentIdDecoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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
A decoder which contains the logic to decode SAML persistent IDs that are managed with a `DurablePairwiseIdStore`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private DataSource`
`dataSource`
A DataSource to auto-provision a `JDBCPairwiseIdStore` instance.
`private final org.slf4j.Logger`
`log`
Class logger.
`private DurablePairwiseIdStore`
`pidStore`
Updated version of persistent identifier data store layer.

## Constructor Summary

Constructors
Constructor
Description
`StoredPersistentIdDecoder()`

## Method Summary

Modifier and Type
Method
Description
`String`
`decode(SubjectCanonicalizationContext c14nContext, NameID nameID)`
Decode the provided `NameID`.
`protected void`
`doInitialize()`
`void`
`setDataSource(DataSource source)`
Set a data source to inject into an auto-provisioned instance of `JDBCPairwiseIdStore` to use as the store.
`void`
`setPersistentIdStore(DurablePairwiseIdStore store)`
Set a `DurablePairwiseIdStore` to use.

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, 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.shared.component.IdentifiedComponent

`getId`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### pidStore

@Nullable private DurablePairwiseIdStore pidStore
Updated version of persistent identifier data store layer.

### dataSource

@Nullable private DataSource dataSource
A DataSource to auto-provision a `JDBCPairwiseIdStore` instance.

## Constructor Details

### StoredPersistentIdDecoder

public StoredPersistentIdDecoder()

## Method Details

### setPersistentIdStore

public void setPersistentIdStore(@Nullable DurablePairwiseIdStore store)
Set a `DurablePairwiseIdStore` to use.

Parameters:
  `store` - the id store

### setDataSource

public void setDataSource(@Nullable DataSource source)
Set a data source to inject into an auto-provisioned instance of `JDBCPairwiseIdStore` to use as the store.

Parameters:
  `source` - data source

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractIdentifiedInitializableComponent`
Throws:
  `ComponentInitializationException`

### decode

@Nullable @NotEmpty public String decode(@Nonnull SubjectCanonicalizationContext c14nContext, @Nonnull NameID nameID) throws NameDecoderException
Decode the provided `NameID`.

If the object is incompatible with the decoder in some way, a null is returned.

Specified by:
  `decode` in interface `NameIDDecoder`
Parameters:
  `c14nContext` - the active c14n context
  `nameID` - the object to decode
Returns:
  the principal decoded from the value, or null
Throws:
  `NameDecoderException` - if an error occurred during translation