Class OAuth2ServiceProviderRegistryImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl
-
- All Implemented Interfaces:
OAuth2ServiceProviderRegistry,Adaptable,Component,Extensible,TimestampedService
public class OAuth2ServiceProviderRegistryImpl extends DefaultComponent implements OAuth2ServiceProviderRegistry
Implementation of theOAuth2ServiceProviderRegistry. The storage backend is a SQL Directory.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDIRECTORY_NAMEprotected static Loglogstatic StringPROVIDER_EPprotected OAuth2ServiceProviderContributionRegistryregistryRegistry of contributed providers.static StringSCHEMA-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description OAuth2ServiceProviderRegistryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2ServiceProvideraddProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String userAuthorizationURL, String clientId, String clientSecret, List<String> scopes, Boolean isEnabled)OAuth2ServiceProvideraddProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String clientId, String clientSecret, List<String> scopes)protected OAuth2ServiceProviderbuildProvider(DocumentModel entry)Instantiates the provider merging the contribution and the directory entryvoiddeleteProvider(String serviceName)OAuth2ServiceProvidergetProvider(String serviceName)protected DocumentModelgetProviderDocModel(String serviceName)List<OAuth2ServiceProvider>getProviders()protected List<DocumentModel>queryProviders(Map<String,Serializable> filter, int limit)voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)protected voidregisterCustomProviders()voidstart(ComponentContext context)Start the component.OAuth2ServiceProviderupdateProvider(String serviceName, OAuth2ServiceProvider provider)-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, 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
-
PROVIDER_EP
public static final String PROVIDER_EP
- See Also:
- Constant Field Values
-
DIRECTORY_NAME
public static final String DIRECTORY_NAME
- See Also:
- Constant Field Values
-
SCHEMA
public static final String SCHEMA
- See Also:
- Constant Field Values
-
registry
protected OAuth2ServiceProviderContributionRegistry registry
Registry of contributed providers. These providers can extend and/or override the default provider class.
-
-
Method Detail
-
getProviderDocModel
protected DocumentModel getProviderDocModel(String serviceName)
-
getProvider
public OAuth2ServiceProvider getProvider(String serviceName)
- Specified by:
getProviderin interfaceOAuth2ServiceProviderRegistry
-
getProviders
public List<OAuth2ServiceProvider> getProviders()
- Specified by:
getProvidersin interfaceOAuth2ServiceProviderRegistry
-
addProvider
public OAuth2ServiceProvider addProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String clientId, String clientSecret, List<String> scopes)
- Specified by:
addProviderin interfaceOAuth2ServiceProviderRegistry
-
addProvider
public OAuth2ServiceProvider addProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String userAuthorizationURL, String clientId, String clientSecret, List<String> scopes, Boolean isEnabled)
- Specified by:
addProviderin interfaceOAuth2ServiceProviderRegistry
-
updateProvider
public OAuth2ServiceProvider updateProvider(String serviceName, OAuth2ServiceProvider provider)
- Specified by:
updateProviderin interfaceOAuth2ServiceProviderRegistry
-
deleteProvider
public void deleteProvider(String serviceName)
- Specified by:
deleteProviderin interfaceOAuth2ServiceProviderRegistry
-
queryProviders
protected List<DocumentModel> queryProviders(Map<String,Serializable> filter, int limit)
-
buildProvider
protected OAuth2ServiceProvider buildProvider(DocumentModel entry)
Instantiates the provider merging the contribution and the directory entry
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
start
public void start(ComponentContext context)
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
registerCustomProviders
protected void registerCustomProviders()
-
-