org.brickred.socialauth.util
Class Token

java.lang.Object
  extended by org.brickred.socialauth.util.Token
All Implemented Interfaces:
Serializable

public class Token
extends Object
implements Serializable

Stores the keys and secret for OAuth access token as well as OAuth request token.

Author:
tarunn@brickred.com
See Also:
Serialized Form

Constructor Summary
Token()
           
Token(String key, String secret)
           
 
Method Summary
 Object getAttribute(String key)
          Gets an attribute based from the given key.
 Map<String,Object> getAttributes()
          Gets the attributes of this token.
 String getKey()
          Retrieves the Token Key
 String getSecret()
          Retrieves the Token Secret
 void setAttribute(String key, Object value)
          Sets an attribute based from the given key and value.
 void setKey(String key)
          Updates the Token Key
 void setSecret(String secret)
          Updates the Token Secret
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(String key,
             String secret)
Parameters:
key - the Key
secret - the Secret

Token

public Token()
Method Detail

getKey

public String getKey()
Retrieves the Token Key

Returns:
the Token Key

setKey

public void setKey(String key)
Updates the Token Key

Parameters:
key - the Token Key

getSecret

public String getSecret()
Retrieves the Token Secret

Returns:
the Token Secret

setSecret

public void setSecret(String secret)
Updates the Token Secret

Parameters:
secret - the Token Secret

getAttributes

public Map<String,Object> getAttributes()
Gets the attributes of this token.


getAttribute

public Object getAttribute(String key)
Gets an attribute based from the given key.


setAttribute

public void setAttribute(String key,
                         Object value)
Sets an attribute based from the given key and value.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.