public class OAuthTokenStoreImpl extends DefaultComponent implements OAuthTokenStore
OAuthTokenStore.
This service is responsible for managing storage of the OAuthToken.
A simple SQL Directory is used for ACCESS Token whereas a simple in memory
storage is used for REQUEST Tokens.
| Modifier and Type | Field and Description |
|---|---|
static String |
DIRECTORY_NAME |
| Constructor and Description |
|---|
OAuthTokenStoreImpl() |
| Modifier and Type | Method and Description |
|---|---|
OAuthToken |
addVerifierToRequestToken(String token,
Long duration)
Generates a verification code and attache it to the REQUEST Token.
|
OAuthToken |
createAccessTokenFromRequestToken(OAuthToken requestToken)
Exchanges the REQUEST Token witha Real ACCESS Token (persistent)
Token/TocketSecret Strings are regerated during the exchange.
|
OAuthToken |
createRequestToken(String consumerKey,
String callBack)
Creates a new REQUEST Token (transient)
|
OAuthToken |
getAccessToken(String token)
Retrieves an ACCESS from the store.
|
NuxeoOAuthToken |
getClientAccessToken(String appId,
String owner)
Get a Access token for the Shindig Client.
|
OAuthToken |
getRequestToken(String token)
Retrieves a REQUEST Token given a Token string (extracted from the
Request).
|
List<OAuthToken> |
listAccessTokenForConsumer(String consumerKey)
Lists ACCESS Token associated to a Consumer application.
|
List<OAuthToken> |
listAccessTokenForUser(String login)
Lists ACCESS Token associated to a User.
|
void |
removeAccessToken(String token)
Deletes an ACCESS Token from the storage.
|
void |
removeClientAccessToken(String appId,
String owner)
Deletes a Client side Access Token.
|
void |
removeRequestToken(String token)
Deletes a REQUEST Token.
|
void |
storeClientAccessToken(String consumerKey,
String callBack,
String token,
String tokenSecret,
String appId,
String owner)
Stores a Access token generated fro Shindig client.
|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, registerExtension, setLastModified, unregisterContribution, unregisterExtensionpublic static final String DIRECTORY_NAME
public OAuthToken addVerifierToRequestToken(String token, Long duration)
OAuthTokenStoreaddVerifierToRequestToken in interface OAuthTokenStorepublic OAuthToken createAccessTokenFromRequestToken(OAuthToken requestToken)
OAuthTokenStorecreateAccessTokenFromRequestToken in interface OAuthTokenStorepublic NuxeoOAuthToken getClientAccessToken(String appId, String owner) throws Exception
OAuthTokenStoregetClientAccessToken in interface OAuthTokenStoreExceptionpublic void removeClientAccessToken(String appId, String owner) throws Exception
OAuthTokenStoreremoveClientAccessToken in interface OAuthTokenStoreExceptionpublic void storeClientAccessToken(String consumerKey, String callBack, String token, String tokenSecret, String appId, String owner)
OAuthTokenStorestoreClientAccessToken in interface OAuthTokenStorepublic OAuthToken createRequestToken(String consumerKey, String callBack)
OAuthTokenStorecreateRequestToken in interface OAuthTokenStorepublic OAuthToken getAccessToken(String token)
OAuthTokenStoregetAccessToken in interface OAuthTokenStorepublic OAuthToken getRequestToken(String token)
OAuthTokenStoregetRequestToken in interface OAuthTokenStorepublic List<OAuthToken> listAccessTokenForConsumer(String consumerKey)
OAuthTokenStorelistAccessTokenForConsumer in interface OAuthTokenStorepublic List<OAuthToken> listAccessTokenForUser(String login)
OAuthTokenStorelistAccessTokenForUser in interface OAuthTokenStorepublic void removeAccessToken(String token) throws Exception
OAuthTokenStoreremoveAccessToken in interface OAuthTokenStoreExceptionpublic void removeRequestToken(String token)
OAuthTokenStoreremoveRequestToken in interface OAuthTokenStoreCopyright © 2013 Nuxeo SA. All Rights Reserved.