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
FieldsFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
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 NuxeoOAuthTokengetTokenFromDirectory(String token) protected NuxeoOAuthTokenlistAccessTokenForConsumer(String consumerKey) Lists ACCESS Token associated to a Consumer application.listAccessTokenForUser(String login) Lists ACCESS Token associated to a User.voidremoveAccessToken(String token) Deletes an ACCESS Token from the storage.voidremoveClientAccessToken(String appId, String owner) Deletes a Client side Access Token.voidremoveRequestToken(String token) Deletes a REQUEST Token.protected NuxeoOAuthTokenvoidstoreClientAccessToken(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, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:OAuthTokenStoreGenerates a verification code and attache it to the REQUEST Token.- Specified by:
addVerifierToRequestTokenin interfaceOAuthTokenStore
-
createAccessTokenFromRequestToken
Description copied from interface:OAuthTokenStoreExchanges the REQUEST Token witha Real ACCESS Token (persistent) Token/TocketSecret Strings are regerated during the exchange.- Specified by:
createAccessTokenFromRequestTokenin interfaceOAuthTokenStore
-
getClientAccessToken
Description copied from interface:OAuthTokenStoreGet a Access token for the Shindig Client.- Specified by:
getClientAccessTokenin interfaceOAuthTokenStore
-
removeClientAccessToken
Description copied from interface:OAuthTokenStoreDeletes a Client side Access Token.- Specified by:
removeClientAccessTokenin interfaceOAuthTokenStore
-
storeClientAccessToken
public void storeClientAccessToken(String consumerKey, String callBack, String token, String tokenSecret, String appId, String owner) Description copied from interface:OAuthTokenStoreStores a Access token generated fro Shindig client.- Specified by:
storeClientAccessTokenin interfaceOAuthTokenStore
-
getTokenFromDirectory
-
getTokenFromDirectoryEntry
-
storeAccessTokenAsDirectoryEntry
-
createRequestToken
Description copied from interface:OAuthTokenStoreCreates a new REQUEST Token (transient)- Specified by:
createRequestTokenin interfaceOAuthTokenStore
-
getAccessToken
Description copied from interface:OAuthTokenStoreRetrieves an ACCESS from the store.- Specified by:
getAccessTokenin interfaceOAuthTokenStore
-
getRequestToken
Description copied from interface:OAuthTokenStoreRetrieves a REQUEST Token given a Token string (extracted from the Request).- Specified by:
getRequestTokenin interfaceOAuthTokenStore
-
listAccessTokenForConsumer
Description copied from interface:OAuthTokenStoreLists ACCESS Token associated to a Consumer application.- Specified by:
listAccessTokenForConsumerin interfaceOAuthTokenStore
-
listAccessTokenForUser
Description copied from interface:OAuthTokenStoreLists ACCESS Token associated to a User.- Specified by:
listAccessTokenForUserin interfaceOAuthTokenStore
-
removeAccessToken
Description copied from interface:OAuthTokenStoreDeletes an ACCESS Token from the storage.- Specified by:
removeAccessTokenin interfaceOAuthTokenStore
-
removeRequestToken
Description copied from interface:OAuthTokenStoreDeletes a REQUEST Token.- Specified by:
removeRequestTokenin interfaceOAuthTokenStore
-