org.springframework.security.oauth.provider.token
Class OAuthProviderTokenImpl

java.lang.Object
  extended by org.springframework.security.oauth.provider.token.OAuthProviderTokenImpl
All Implemented Interfaces:
Serializable, OAuthAccessProviderToken, OAuthProviderToken

public class OAuthProviderTokenImpl
extends Object
implements OAuthAccessProviderToken

Basic implementation for an OAuth token.

Author:
Ryan Heaton
See Also:
Serialized Form

Constructor Summary
OAuthProviderTokenImpl()
           
 
Method Summary
 String getCallbackUrl()
          The callback url associated with this token.
 String getConsumerKey()
          The consumer key associated with this oauth token.
 String getSecret()
          The token secret.
 long getTimestamp()
          Timestamp associated with this token.
 org.springframework.security.core.Authentication getUserAuthentication()
          The authentication of the user who granted the access token.
 String getValue()
          The value of the token.
 String getVerifier()
          The verifier string for this token.
 boolean isAccessToken()
          Whether this is an OAuth access token.
 void setAccessToken(boolean accessToken)
          Whether this is an OAuth access token.
 void setCallbackUrl(String callbackUrl)
          The callback url associated with this token.
 void setConsumerKey(String consumerKey)
          The consumer key associated with this oauth token.
 void setSecret(String secret)
          The token secret.
 void setTimestamp(long timestamp)
          Timestamp associated with this token.
 void setUserAuthentication(org.springframework.security.core.Authentication userAuthentication)
          The authentication of the user who granted the access token.
 void setValue(String value)
          The value of the token.
 void setVerifier(String verifier)
          The verifier string for this (access) token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthProviderTokenImpl

public OAuthProviderTokenImpl()
Method Detail

getValue

public String getValue()
The value of the token.

Specified by:
getValue in interface OAuthProviderToken
Returns:
The value of the token.

setValue

public void setValue(String value)
The value of the token.

Parameters:
value - The value of the token.

getSecret

public String getSecret()
The token secret.

Specified by:
getSecret in interface OAuthProviderToken
Returns:
The token secret.

setSecret

public void setSecret(String secret)
The token secret.

Parameters:
secret - The token secret.

getConsumerKey

public String getConsumerKey()
The consumer key associated with this oauth token.

Specified by:
getConsumerKey in interface OAuthProviderToken
Returns:
The consumer key associated with this oauth token.

setConsumerKey

public void setConsumerKey(String consumerKey)
The consumer key associated with this oauth token.

Parameters:
consumerKey - The consumer key associated with this oauth token.

getCallbackUrl

public String getCallbackUrl()
The callback url associated with this token.

Specified by:
getCallbackUrl in interface OAuthProviderToken
Returns:
The callback url associated with this token.

setCallbackUrl

public void setCallbackUrl(String callbackUrl)
The callback url associated with this token.

Parameters:
callbackUrl - The callback url associated with this token.

isAccessToken

public boolean isAccessToken()
Whether this is an OAuth access token.

Specified by:
isAccessToken in interface OAuthProviderToken
Returns:
Whether this is an OAuth access token.

setAccessToken

public void setAccessToken(boolean accessToken)
Whether this is an OAuth access token.

Parameters:
accessToken - Whether this is an OAuth access token.

getVerifier

public String getVerifier()
The verifier string for this token.

Specified by:
getVerifier in interface OAuthProviderToken
Returns:
The verifier string for this token.

setVerifier

public void setVerifier(String verifier)
The verifier string for this (access) token.

Parameters:
verifier - The verifier string for this (access) token.

getUserAuthentication

public org.springframework.security.core.Authentication getUserAuthentication()
The authentication of the user who granted the access token.

Specified by:
getUserAuthentication in interface OAuthAccessProviderToken
Returns:
The authentication of the user who granted the access token.

setUserAuthentication

public void setUserAuthentication(org.springframework.security.core.Authentication userAuthentication)
The authentication of the user who granted the access token.

Parameters:
userAuthentication - The authentication of the user who granted the access token.

getTimestamp

public long getTimestamp()
Timestamp associated with this token.

Returns:
Timestamp associated with this token.

setTimestamp

public void setTimestamp(long timestamp)
Timestamp associated with this token.

Parameters:
timestamp - Timestamp associated with this token.


Copyright © 2012. All Rights Reserved.