org.apache.shindig.auth
Class BasicSecurityTokenCodec
java.lang.Object
org.apache.shindig.auth.BasicSecurityTokenCodec
- All Implemented Interfaces:
- SecurityTokenCodec
public class BasicSecurityTokenCodec
- extends Object
- implements SecurityTokenCodec
A SecurityTokenCodec implementation that just provides dummy data to satisfy
tests and API calls. Do not use this for any security applications.
- Since:
- 2.0.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicSecurityTokenCodec
public BasicSecurityTokenCodec()
- Creates a signer with 24 hour token expiry
encodeToken
public String encodeToken(SecurityToken token)
- Encodes a token using the a plaintext dummy format.
- Specified by:
encodeToken in interface SecurityTokenCodec
- Parameters:
token - token to encode
- Returns:
- token with values separated by colons
createToken
public SecurityToken createToken(Map<String,String> parameters)
throws SecurityTokenException
- Decrypts and verifies a gadget security token to return a gadget token.
Returns a token with some faked out values.
- Specified by:
createToken in interface SecurityTokenCodec
- Parameters:
parameters - Map containing a entry 'token' in wire format (probably encrypted.)
- Returns:
- the decrypted and verified token.
- Throws:
SecurityTokenException - If tokenString is not a valid token
Copyright © 2007-2012. All Rights Reserved.