|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.model.DefaultComponent org.nuxeo.ecm.platform.oauth.tokens.OAuthTokenStoreImpl
public class OAuthTokenStoreImpl
Service implementation for 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.
Field Summary | |
---|---|
static String |
DIRECTORY_NAME
|
Constructor Summary | |
---|---|
OAuthTokenStoreImpl()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
---|
activate, applicationStarted, deactivate, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DIRECTORY_NAME
Constructor Detail |
---|
public OAuthTokenStoreImpl()
Method Detail |
---|
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
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |