public class BasicSecurityTokenCodec extends Object implements SecurityTokenCodec, ContainerConfig.ConfigObserver
ACTIVE_URL_NAME, SECURITY_TOKEN_NAME, SECURITY_TOKEN_TTL_CONFIG| Constructor and Description |
|---|
BasicSecurityTokenCodec()
Creates a basic signer
|
BasicSecurityTokenCodec(ContainerConfig config)
Creates a basic signer that can observe container configuration changes
|
| Modifier and Type | Method and Description |
|---|---|
void |
containersChanged(ContainerConfig config,
Collection<String> changed,
Collection<String> removed)
Notifies the object that some container configurations have been added or
modified.
|
SecurityToken |
createToken(Map<String,String> parameters)
Decrypts and verifies a gadget security token to return a gadget token.
|
String |
encodeToken(SecurityToken token)
Encodes a token using the a plaintext dummy format.
|
int |
getTokenTimeToLive()
This method is deprecated in favor of
SecurityTokenCodec.getTokenTimeToLive(String). |
int |
getTokenTimeToLive(String container) |
public BasicSecurityTokenCodec()
public BasicSecurityTokenCodec(ContainerConfig config)
config - the container config to observepublic String encodeToken(SecurityToken token)
encodeToken in interface SecurityTokenCodectoken - token to encodepublic SecurityToken createToken(Map<String,String> parameters) throws SecurityTokenException
createToken in interface SecurityTokenCodecparameters - Map containing a entry 'token' in wire format (probably encrypted.)SecurityTokenException - If tokenString is not a valid tokenpublic int getTokenTimeToLive()
SecurityTokenCodecSecurityTokenCodec.getTokenTimeToLive(String).
Implementations should only rely on this method to return the default time-to-live of tokens
generated by this codec in the case where getTokenTimeToLive(String) fails.getTokenTimeToLive in interface SecurityTokenCodecSecurityTokenCodec.getTokenTimeToLive(String)public int getTokenTimeToLive(String container)
getTokenTimeToLive in interface SecurityTokenCodeccontainer - The container the token is forpublic void containersChanged(ContainerConfig config, Collection<String> changed, Collection<String> removed)
containersChanged in interface ContainerConfig.ConfigObserverconfig - The ContainerConfig object where the configuration was
changed.changed - The names of the containers that have been added or
modified.removed - The names of the containers that have been removed.Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.