Class OAuthConsumerRegistryImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.platform.oauth.consumers.OAuthConsumerRegistryImpl
-
- All Implemented Interfaces:
OAuthConsumerRegistry
,Adaptable
,Component
,Extensible
,TimestampedService
public class OAuthConsumerRegistryImpl extends DefaultComponent implements OAuthConsumerRegistry
Implementation of theOAuthConsumerRegistry
Service. It's basically a simple Storage API on top of an SQL Directory.- Author:
- tiry
-
-
Field Summary
Fields Modifier and Type Field Description static String
DIRECTORY_NAME
protected static Log
log
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description OAuthConsumerRegistryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteConsumer(String consumerKey)
remove a ConsumerNuxeoOAuthConsumer
getConsumer(String consumerKey)
Get a Consumer from its consumerKey.NuxeoOAuthConsumer
getConsumer(String consumerKey, String keyType)
Get a Consumer from its consumerKey.protected NuxeoOAuthConsumer
getEntry(String consumerKey, String keyType)
List<NuxeoOAuthConsumer>
listConsumers()
List all registered ConsumersNuxeoOAuthConsumer
storeConsumer(NuxeoOAuthConsumer consumer)
Store a new Consumer-
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
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
log
protected static final Log log
-
DIRECTORY_NAME
public static final String DIRECTORY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConsumer
public NuxeoOAuthConsumer getConsumer(String consumerKey, String keyType)
Description copied from interface:OAuthConsumerRegistry
Get a Consumer from its consumerKey.The keyType param indicates if we need HMAC or RSA secret. This is needed because the default OAuthValidator implementation only uses 1 field for both Keys. If keyType is OAUth.RSA_SHA1, the consumerSecret field will be polupated with the RSA public key rather than the HMAC secret.
- Specified by:
getConsumer
in interfaceOAuthConsumerRegistry
-
getConsumer
public NuxeoOAuthConsumer getConsumer(String consumerKey)
Description copied from interface:OAuthConsumerRegistry
Get a Consumer from its consumerKey.- Specified by:
getConsumer
in interfaceOAuthConsumerRegistry
-
getEntry
protected NuxeoOAuthConsumer getEntry(String consumerKey, String keyType)
-
storeConsumer
public NuxeoOAuthConsumer storeConsumer(NuxeoOAuthConsumer consumer)
Description copied from interface:OAuthConsumerRegistry
Store a new Consumer- Specified by:
storeConsumer
in interfaceOAuthConsumerRegistry
-
deleteConsumer
public void deleteConsumer(String consumerKey)
Description copied from interface:OAuthConsumerRegistry
remove a Consumer- Specified by:
deleteConsumer
in interfaceOAuthConsumerRegistry
-
listConsumers
public List<NuxeoOAuthConsumer> listConsumers()
Description copied from interface:OAuthConsumerRegistry
List all registered Consumers- Specified by:
listConsumers
in interfaceOAuthConsumerRegistry
-
-