public class StoredTransientIdGenerationStrategy extends AbstractIdentifiableInitializableComponent implements TransientIdGenerationStrategy
StorageService to manage the reverse mappings.
The identifier itself is the record key, and the value combines the principal name with the identifier of the recipient.
| Modifier and Type | Field and Description |
|---|---|
private IdentifierGenerationStrategy |
idGenerator
Generator of random, hex-encoded, identifiers.
|
private long |
idLifetime
Length, in milliseconds, identifiers are valid.
|
private int |
idSize
Size, in bytes, of the identifier.
|
private org.opensaml.storage.StorageService |
idStore
Store used to map identifiers to principals.
|
private org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
StoredTransientIdGenerationStrategy()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize() |
String |
generate(String relyingPartyId,
String principalName)
Generate a new Transient ID.
|
long |
getIdLifetime()
Get the time, in milliseconds, ids are valid.
|
int |
getIdSize()
Get the size, in bytes, of the id.
|
void |
setIdGenerator(IdentifierGenerationStrategy generator)
Set the ID generator we should use.
|
void |
setIdLifetime(long lifetime)
Set the time, in milliseconds, ids are valid.
|
void |
setIdSize(int size)
Set the size, in bytes, of the id.
|
void |
setIdStore(org.opensaml.storage.StorageService store)
Set the ID store we should use.
|
setIdgetIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId@Nonnull private final org.slf4j.Logger log
@NonnullAfterInit private org.opensaml.storage.StorageService idStore
@NonnullAfterInit private IdentifierGenerationStrategy idGenerator
private int idSize
public StoredTransientIdGenerationStrategy()
public void setIdStore(@Nonnull org.opensaml.storage.StorageService store)
store - the store to use.public void setIdGenerator(@Nonnull IdentifierGenerationStrategy generator)
generator - identifier generation strategy to use@Positive public int getIdSize()
public void setIdSize(@Positive int size)
size - size, in bytes, of the id@Positive public long getIdLifetime()
public void setIdLifetime(@Duration@Positive long lifetime)
lifetime - time, in milliseconds, ids are validprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractIdentifiedInitializableComponentComponentInitializationException@Nonnull @NotEmpty public String generate(@Nonnull@NotEmpty String relyingPartyId, @Nonnull@NotEmpty String principalName) throws org.opensaml.saml.common.SAMLException
generate in interface TransientIdGenerationStrategyrelyingPartyId - the relying party for whom we're generatingprincipalName - the principal to map toorg.opensaml.saml.common.SAMLException - if an error occurs generating the identifierCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.