Class OAuthTokenStoreImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.oauth.tokens.OAuthTokenStoreImpl
- All Implemented Interfaces:
OAuthTokenStore
,Adaptable
,Component
,Extensible
,TimestampedService
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.
- Author:
- tiry
-
Field Summary
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddVerifierToRequestToken
(String token, Long duration) Generates a verification code and attache it to the REQUEST Token.createAccessTokenFromRequestToken
(OAuthToken requestToken) Exchanges the REQUEST Token witha Real ACCESS Token (persistent) Token/TocketSecret Strings are regerated during the exchange.createRequestToken
(String consumerKey, String callBack) Creates a new REQUEST Token (transient)getAccessToken
(String token) Retrieves an ACCESS from the store.getClientAccessToken
(String appId, String owner) Get a Access token for the Shindig Client.getRequestToken
(String token) Retrieves a REQUEST Token given a Token string (extracted from the Request).protected NuxeoOAuthToken
getTokenFromDirectory
(String token) protected NuxeoOAuthToken
listAccessTokenForConsumer
(String consumerKey) Lists ACCESS Token associated to a Consumer application.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.protected NuxeoOAuthToken
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, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
DIRECTORY_NAME
- See Also:
-
requestTokenStore
-
-
Constructor Details
-
OAuthTokenStoreImpl
public OAuthTokenStoreImpl()
-
-
Method Details
-
addVerifierToRequestToken
Description copied from interface:OAuthTokenStore
Generates a verification code and attache it to the REQUEST Token.- Specified by:
addVerifierToRequestToken
in interfaceOAuthTokenStore
-
createAccessTokenFromRequestToken
Description copied from interface:OAuthTokenStore
Exchanges the REQUEST Token witha Real ACCESS Token (persistent) Token/TocketSecret Strings are regerated during the exchange.- Specified by:
createAccessTokenFromRequestToken
in interfaceOAuthTokenStore
-
getClientAccessToken
Description copied from interface:OAuthTokenStore
Get a Access token for the Shindig Client.- Specified by:
getClientAccessToken
in interfaceOAuthTokenStore
-
removeClientAccessToken
Description copied from interface:OAuthTokenStore
Deletes a Client side Access Token.- Specified by:
removeClientAccessToken
in interfaceOAuthTokenStore
-
storeClientAccessToken
public void storeClientAccessToken(String consumerKey, String callBack, String token, String tokenSecret, String appId, String owner) Description copied from interface:OAuthTokenStore
Stores a Access token generated fro Shindig client.- Specified by:
storeClientAccessToken
in interfaceOAuthTokenStore
-
getTokenFromDirectory
-
getTokenFromDirectoryEntry
-
storeAccessTokenAsDirectoryEntry
-
createRequestToken
Description copied from interface:OAuthTokenStore
Creates a new REQUEST Token (transient)- Specified by:
createRequestToken
in interfaceOAuthTokenStore
-
getAccessToken
Description copied from interface:OAuthTokenStore
Retrieves an ACCESS from the store.- Specified by:
getAccessToken
in interfaceOAuthTokenStore
-
getRequestToken
Description copied from interface:OAuthTokenStore
Retrieves a REQUEST Token given a Token string (extracted from the Request).- Specified by:
getRequestToken
in interfaceOAuthTokenStore
-
listAccessTokenForConsumer
Description copied from interface:OAuthTokenStore
Lists ACCESS Token associated to a Consumer application.- Specified by:
listAccessTokenForConsumer
in interfaceOAuthTokenStore
-
listAccessTokenForUser
Description copied from interface:OAuthTokenStore
Lists ACCESS Token associated to a User.- Specified by:
listAccessTokenForUser
in interfaceOAuthTokenStore
-
removeAccessToken
Description copied from interface:OAuthTokenStore
Deletes an ACCESS Token from the storage.- Specified by:
removeAccessToken
in interfaceOAuthTokenStore
-
removeRequestToken
Description copied from interface:OAuthTokenStore
Deletes a REQUEST Token.- Specified by:
removeRequestToken
in interfaceOAuthTokenStore
-