Class OAuthServiceProviderRegistryImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.oauth.providers.OAuthServiceProviderRegistryImpl
- All Implemented Interfaces:
OAuthServiceProviderRegistry,Adaptable,Component,Extensible,TimestampedService
public class OAuthServiceProviderRegistryImpl
extends DefaultComponent
implements OAuthServiceProviderRegistry
Implementation of the
OAuthServiceProviderRegistry. The main storage backend is a SQL Directory. Readonly
providers (contributed directly at OpenSocialService level) are managed in memory.- Author:
- tiry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Map<String, NuxeoOAuthServiceProvider> protected static final RandomFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddReadOnlyProvider(String gadgetUri, String serviceName, String consumerKey, String consumerSecret, String publicKey) This method is here for compatibility reasons.voiddeleteProvider(String providerId) Deletes a provider.voiddeleteProvider(String gadgetUri, String serviceName) Deletes a provider.protected StringgetBareGadgetUri(String gadgetUri) protected DocumentModelgetBestEntry(DocumentModelList entries, String gadgetUri, String serviceName) protected NuxeoOAuthServiceProvidergetProvider(String gadgetUri, String serviceName) Select the best provider given.Return the list of all know providers (both readonly and editable ones).protected StringmkStringIdx(String gadgetUri, String serviceName) protected StringpreProcessServiceName(String serviceName) 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:
-
RANDOM
-
inMemoryProviders
-
-
Constructor Details
-
OAuthServiceProviderRegistryImpl
public OAuthServiceProviderRegistryImpl()
-
-
Method Details
-
getProvider
Description copied from interface:OAuthServiceProviderRegistrySelect the best provider given.- Specified by:
getProviderin interfaceOAuthServiceProviderRegistry- Parameters:
gadgetUri- the gadget url (or AppId)serviceName- the service name as defined in MakeRequest
-
getBareGadgetUri
-
preProcessServiceName
-
getBestEntry
protected DocumentModel getBestEntry(DocumentModelList entries, String gadgetUri, String serviceName) throws PropertyException - Throws:
PropertyException
-
getEntry
protected NuxeoOAuthServiceProvider getEntry(String gadgetUri, String serviceName, Set<String> ftFilter) -
mkStringIdx
-
addReadOnlyProvider
public NuxeoOAuthServiceProvider addReadOnlyProvider(String gadgetUri, String serviceName, String consumerKey, String consumerSecret, String publicKey) Description copied from interface:OAuthServiceProviderRegistryThis method is here for compatibility reasons. Providers that are directly contributed to the OpenSocialService are forwarded to the new centralized service.- Specified by:
addReadOnlyProviderin interfaceOAuthServiceProviderRegistry
-
deleteProvider
Description copied from interface:OAuthServiceProviderRegistryDeletes a provider.- Specified by:
deleteProviderin interfaceOAuthServiceProviderRegistry
-
deleteProvider
Description copied from interface:OAuthServiceProviderRegistryDeletes a provider.- Specified by:
deleteProviderin interfaceOAuthServiceProviderRegistry
-
listProviders
Description copied from interface:OAuthServiceProviderRegistryReturn the list of all know providers (both readonly and editable ones).- Specified by:
listProvidersin interfaceOAuthServiceProviderRegistry
-