public class OAuthConsumerRegistryImpl extends DefaultComponent implements OAuthConsumerRegistry
OAuthConsumerRegistry
Service. It's basically a simple Storage API on top of an SQL
Directory.Modifier and Type | Field and Description |
---|---|
static String |
DIRECTORY_NAME |
protected static org.apache.commons.logging.Log |
log |
lastModified
Constructor and Description |
---|
OAuthConsumerRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
deleteConsumer(String consumerKey)
remove a Consumer
|
NuxeoOAuthConsumer |
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 Consumers
|
NuxeoOAuthConsumer |
storeConsumer(NuxeoOAuthConsumer consumer)
Store a new Consumer
|
activate, deactivate, getAdapter, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterContribution, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected static final org.apache.commons.logging.Log log
public static final String DIRECTORY_NAME
public OAuthConsumerRegistryImpl()
public NuxeoOAuthConsumer getConsumer(String consumerKey, String keyType)
OAuthConsumerRegistry
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.
getConsumer
in interface OAuthConsumerRegistry
public NuxeoOAuthConsumer getConsumer(String consumerKey)
OAuthConsumerRegistry
getConsumer
in interface OAuthConsumerRegistry
protected NuxeoOAuthConsumer getEntry(String consumerKey, String keyType)
public NuxeoOAuthConsumer storeConsumer(NuxeoOAuthConsumer consumer)
OAuthConsumerRegistry
storeConsumer
in interface OAuthConsumerRegistry
public void deleteConsumer(String consumerKey)
OAuthConsumerRegistry
deleteConsumer
in interface OAuthConsumerRegistry
public List<NuxeoOAuthConsumer> listConsumers()
OAuthConsumerRegistry
listConsumers
in interface OAuthConsumerRegistry
Copyright © 2018 Nuxeo. All rights reserved.