public class DefaultSecurityTokenCodec extends Object implements SecurityTokenCodec
ACTIVE_URL_NAME, SECURITY_TOKEN_NAME, SECURITY_TOKEN_TTL_CONFIG| Constructor and Description |
|---|
DefaultSecurityTokenCodec(ContainerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
SecurityToken |
createToken(Map<String,String> tokenParameters)
Decrypts and verifies a gadget security token to return a gadget token.
|
String |
encodeToken(SecurityToken token) |
protected SecurityTokenCodec |
getCodec() |
int |
getTokenTimeToLive()
This method is deprecated in favor of
SecurityTokenCodec.getTokenTimeToLive(String). |
int |
getTokenTimeToLive(String container) |
@Inject public DefaultSecurityTokenCodec(ContainerConfig config)
public SecurityToken createToken(Map<String,String> tokenParameters) throws SecurityTokenException
SecurityTokenCodeccreateToken in interface SecurityTokenCodectokenParameters - Map containing a entry 'token' in wire format (probably encrypted.)SecurityTokenException - If tokenString is not a valid tokenpublic String encodeToken(SecurityToken token) throws SecurityTokenException
encodeToken in interface SecurityTokenCodecSecurityTokenExceptionprotected SecurityTokenCodec getCodec()
public 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 forCopyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.