org.apache.shindig.gadgets.oauth
Class OAuthClientState

java.lang.Object
  extended by org.apache.shindig.gadgets.oauth.OAuthClientState

public class OAuthClientState
extends Object

Class to handle OAuth fetcher state stored client side. The state is stored as a signed, encrypted, time stamped blob.


Constructor Summary
OAuthClientState(BlobCrypter crypter)
          Create a new, empty client state blob.
OAuthClientState(BlobCrypter crypter, String stateBlob)
          Initialize client state based on an encrypted blob passed by the client.
 
Method Summary
 String getAccessToken()
          OAuth access token.
 String getAccessTokenSecret()
          OAuth access token secret.
 String getEncryptedState()
           
 String getOwner()
          Owner of the OAuth token.
 String getRequestToken()
          OAuth request token
 String getRequestTokenSecret()
          OAuth request token secret
 String getSessionHandle()
          Session handle (http://oauth.googlecode.com/svn/spec/ext/session/1.0/drafts/1/spec.html)
 long getTokenExpireMillis()
          Expiration of access token (http://oauth.googlecode.com/svn/spec/ext/session/1.0/drafts/1/spec.html)
 boolean isEmpty()
           
 void setAccessToken(String accessToken)
           
 void setAccessTokenSecret(String accessTokenSecret)
           
 void setOwner(String owner)
           
 void setRequestToken(String requestToken)
           
 void setRequestTokenSecret(String requestTokenSecret)
           
 void setSessionHandle(String sessionHandle)
           
 void setTokenExpireMillis(long expirationMillis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthClientState

public OAuthClientState(BlobCrypter crypter)
Create a new, empty client state blob.

Parameters:
crypter -

OAuthClientState

public OAuthClientState(BlobCrypter crypter,
                        String stateBlob)
Initialize client state based on an encrypted blob passed by the client.

Parameters:
crypter -
stateBlob -
Method Detail

isEmpty

public boolean isEmpty()
Returns:
true if there is no state to store with the client.

getEncryptedState

public String getEncryptedState()
                         throws BlobCrypterException
Returns:
an encrypted blob of state to store with the client.
Throws:
BlobCrypterException

getRequestToken

public String getRequestToken()
OAuth request token


setRequestToken

public void setRequestToken(String requestToken)

getRequestTokenSecret

public String getRequestTokenSecret()
OAuth request token secret


setRequestTokenSecret

public void setRequestTokenSecret(String requestTokenSecret)

getAccessToken

public String getAccessToken()
OAuth access token.


setAccessToken

public void setAccessToken(String accessToken)

getAccessTokenSecret

public String getAccessTokenSecret()
OAuth access token secret.


setAccessTokenSecret

public void setAccessTokenSecret(String accessTokenSecret)

getSessionHandle

public String getSessionHandle()
Session handle (http://oauth.googlecode.com/svn/spec/ext/session/1.0/drafts/1/spec.html)


setSessionHandle

public void setSessionHandle(String sessionHandle)

getTokenExpireMillis

public long getTokenExpireMillis()
Expiration of access token (http://oauth.googlecode.com/svn/spec/ext/session/1.0/drafts/1/spec.html)


setTokenExpireMillis

public void setTokenExpireMillis(long expirationMillis)

getOwner

public String getOwner()
Owner of the OAuth token.


setOwner

public void setOwner(String owner)


Copyright © 2007-2012. All Rights Reserved.