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 theOAuthConsumerRegistryService. It's basically a simple Storage API on top of an SQL Directory.- Author:
- tiry
-
-
Field Summary
Fields Modifier and Type Field Description static StringDIRECTORY_NAMEprotected static Loglog-
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 voiddeleteConsumer(String consumerKey)remove a ConsumerNuxeoOAuthConsumergetConsumer(String consumerKey)Get a Consumer from its consumerKey.NuxeoOAuthConsumergetConsumer(String consumerKey, String keyType)Get a Consumer from its consumerKey.protected NuxeoOAuthConsumergetEntry(String consumerKey, String keyType)List<NuxeoOAuthConsumer>listConsumers()List all registered ConsumersNuxeoOAuthConsumerstoreConsumer(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
-
DIRECTORY_NAME
public static final String DIRECTORY_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OAuthConsumerRegistryImpl
public OAuthConsumerRegistryImpl()
-
-
Method Detail
-
getConsumer
public NuxeoOAuthConsumer getConsumer(String consumerKey, String keyType)
Description copied from interface:OAuthConsumerRegistryGet 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:
getConsumerin interfaceOAuthConsumerRegistry
-
getConsumer
public NuxeoOAuthConsumer getConsumer(String consumerKey)
Description copied from interface:OAuthConsumerRegistryGet a Consumer from its consumerKey.- Specified by:
getConsumerin interfaceOAuthConsumerRegistry
-
getEntry
protected NuxeoOAuthConsumer getEntry(String consumerKey, String keyType)
-
storeConsumer
public NuxeoOAuthConsumer storeConsumer(NuxeoOAuthConsumer consumer)
Description copied from interface:OAuthConsumerRegistryStore a new Consumer- Specified by:
storeConsumerin interfaceOAuthConsumerRegistry
-
deleteConsumer
public void deleteConsumer(String consumerKey)
Description copied from interface:OAuthConsumerRegistryremove a Consumer- Specified by:
deleteConsumerin interfaceOAuthConsumerRegistry
-
listConsumers
public List<NuxeoOAuthConsumer> listConsumers()
Description copied from interface:OAuthConsumerRegistryList all registered Consumers- Specified by:
listConsumersin interfaceOAuthConsumerRegistry
-
-