public class TransientIdAttributeDefinition extends BaseAttributeDefinition
StorageService
in the form of
TransientIdEntry
s. Each entry is mapped under two keys; the generated ID and a key derived from the tuple
(outbound message issuer, inbound message issuer, principal name).Modifier and Type | Field and Description |
---|---|
private IdentifierGenerator |
idGenerator
Generator of random, hex-encoded, tokens.
|
private long |
idLifetime
Length, in milliseconds, tokens are valid.
|
private int |
idSize
Size, in bytes, of the token.
|
private StorageService<String,TransientIdEntry> |
idStore
Store used to map tokens to principals.
|
private org.slf4j.Logger |
log
Class logger.
|
private String |
partition
Storage partition in which IDs are stored.
|
Constructor and Description |
---|
TransientIdAttributeDefinition(StorageService<String,TransientIdEntry> store)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected BaseAttribute |
doResolve(ShibbolethResolutionContext resolutionContext)
Creates and populates the values for the resolved attribute.
|
long |
getIdLifetime()
Gets the time, in milliseconds, ids are valid.
|
int |
getIdSize()
Gets the size, in bytes, of the id.
|
void |
setIdSize(int size)
Sets the size, in bytes, of the id.
|
void |
setTokenLiftetime(long lifetime)
Sets the time, in milliseconds, ids are valid.
|
void |
validate()
Validate the internal state of this plug-in.
|
getAttributeEncoders, getDisplayDescriptions, getDisplayNames, getSourceAttributeID, getValuesFromAllDependencies, isDependencyOnly, resolve, setDependencyOnly, setSourceAttributeID
getDependencyIds, getId, getValuesFromAllDependencies, getValuesFromAttributeDependency, getValuesFromConnectorDependency, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDependencyIds, getId
private final org.slf4j.Logger log
private StorageService<String,TransientIdEntry> idStore
private String partition
private IdentifierGenerator idGenerator
private int idSize
private long idLifetime
public TransientIdAttributeDefinition(StorageService<String,TransientIdEntry> store) throws NoSuchAlgorithmException
store
- store used to map tokens to principalsNoSuchAlgorithmException
- thrown if the SHA1PRNG, used as the default random number generation algorithm,
is not supportedprotected BaseAttribute doResolve(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
doResolve
in class BaseAttributeDefinition
resolutionContext
- current attribute resolution contextAttributeResolutionException
- thrown if there is a problem resolving and creating the attributepublic int getIdSize()
public void setIdSize(int size)
size
- size, in bytes, of the idpublic long getIdLifetime()
public void setTokenLiftetime(long lifetime)
lifetime
- time, in milliseconds, ids are validpublic void validate() throws AttributeResolutionException
AttributeResolutionException
- if the plug-in has an invalid internal stateCopyright © 1999-2012. All Rights Reserved.