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, unregisterExtension
public static final String DIRECTORY_NAME
public OAuthToken addVerifierToRequestToken(String token, Long duration)
OAuthTokenStore
addVerifierToRequestToken
in interface OAuthTokenStore
public OAuthToken createAccessTokenFromRequestToken(OAuthToken requestToken)
OAuthTokenStore
createAccessTokenFromRequestToken
in interface OAuthTokenStore
public NuxeoOAuthToken getClientAccessToken(String appId, String owner) throws Exception
OAuthTokenStore
getClientAccessToken
in interface OAuthTokenStore
Exception
public void removeClientAccessToken(String appId, String owner) throws Exception
OAuthTokenStore
removeClientAccessToken
in interface OAuthTokenStore
Exception
public void storeClientAccessToken(String consumerKey, String callBack, String token, String tokenSecret, String appId, String owner)
OAuthTokenStore
storeClientAccessToken
in interface OAuthTokenStore
public OAuthToken createRequestToken(String consumerKey, String callBack)
OAuthTokenStore
createRequestToken
in interface OAuthTokenStore
public OAuthToken getAccessToken(String token)
OAuthTokenStore
getAccessToken
in interface OAuthTokenStore
public OAuthToken getRequestToken(String token)
OAuthTokenStore
getRequestToken
in interface OAuthTokenStore
public List<OAuthToken> listAccessTokenForConsumer(String consumerKey)
OAuthTokenStore
listAccessTokenForConsumer
in interface OAuthTokenStore
public List<OAuthToken> listAccessTokenForUser(String login)
OAuthTokenStore
listAccessTokenForUser
in interface OAuthTokenStore
public void removeAccessToken(String token) throws Exception
OAuthTokenStore
removeAccessToken
in interface OAuthTokenStore
Exception
public void removeRequestToken(String token)
OAuthTokenStore
removeRequestToken
in interface OAuthTokenStore
Copyright © 2013 Nuxeo SA. All Rights Reserved.