org.apache.shindig.auth
Class BasicSecurityTokenCodec

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface org.apache.shindig.auth.SecurityTokenCodec
ACTIVE_URL_NAME, SECURITY_TOKEN_NAME
 
Constructor Summary
BasicSecurityTokenCodec()
          Creates a signer with 24 hour token expiry
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicSecurityTokenCodec

public BasicSecurityTokenCodec()
Creates a signer with 24 hour token expiry

Method Detail

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.