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 String
DIRECTORY_NAME
protected static Log
log
static String
PROVIDER_EP
protected OAuth2ServiceProviderContributionRegistry
registry
Registry of contributed providers.static String
SCHEMA
-
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 OAuth2ServiceProvider
addProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String userAuthorizationURL, String clientId, String clientSecret, List<String> scopes, Boolean isEnabled)
OAuth2ServiceProvider
addProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String clientId, String clientSecret, List<String> scopes)
protected OAuth2ServiceProvider
buildProvider(DocumentModel entry)
Instantiates the provider merging the contribution and the directory entryvoid
deleteProvider(String serviceName)
OAuth2ServiceProvider
getProvider(String serviceName)
protected DocumentModel
getProviderDocModel(String serviceName)
List<OAuth2ServiceProvider>
getProviders()
protected List<DocumentModel>
queryProviders(Map<String,Serializable> filter, int limit)
void
registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
protected void
registerCustomProviders()
void
start(ComponentContext context)
Start the component.OAuth2ServiceProvider
updateProvider(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:
getProvider
in interfaceOAuth2ServiceProviderRegistry
-
getProviders
public List<OAuth2ServiceProvider> getProviders()
- Specified by:
getProviders
in interfaceOAuth2ServiceProviderRegistry
-
addProvider
public OAuth2ServiceProvider addProvider(String serviceName, String description, String tokenServerURL, String authorizationServerURL, String clientId, String clientSecret, List<String> scopes)
- Specified by:
addProvider
in 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:
addProvider
in interfaceOAuth2ServiceProviderRegistry
-
updateProvider
public OAuth2ServiceProvider updateProvider(String serviceName, OAuth2ServiceProvider provider)
- Specified by:
updateProvider
in interfaceOAuth2ServiceProviderRegistry
-
deleteProvider
public void deleteProvider(String serviceName)
- Specified by:
deleteProvider
in 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:
registerContribution
in classDefaultComponent
-
start
public void start(ComponentContext context)
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
registerCustomProviders
protected void registerCustomProviders()
-
-