Package org.forgerock.oauth2.core
Class OAuth2ProviderSettingsFactory
- java.lang.Object
-
- org.forgerock.oauth2.core.OAuth2ProviderSettingsFactory
-
- All Implemented Interfaces:
ServiceListener
@Singleton public class OAuth2ProviderSettingsFactory extends Object implements ServiceListener
A factory for creating/retrieving OAuth2ProviderSettings instances.
It is up to the implementation to provide caching of OAuth2ProviderSettings instance if it wants to supported multiple OAuth2 providers.- Since:
- 12.0.0
-
-
Field Summary
-
Fields inherited from interface com.sun.identity.sm.ServiceListener
ADDED, MODIFIED, REMOVED
-
-
Constructor Summary
Constructors Constructor Description OAuth2ProviderSettingsFactory(ResourceSetStoreFactory resourceSetStoreFactory, OAuth2RealmResolver realmResolver, ServiceConfigManagerFactory serviceConfigManagerFactory)Constructs a newOpenAMOAuth2ProviderSettingsFactoryinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2ProviderSettingsget(OAuth2Request request)Gets the instance of the OAuth2ProviderSettingsOAuth2ProviderSettingsget(org.forgerock.services.context.Context context)Gets the instance of the OAuth2ProviderSettings.OAuth2ProviderSettingsgetRealmProviderSettings(String realm)Gets the instance of the OAuth2ProviderSettings defined in the realm.voidglobalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int type)This method will be invoked when a service's global configuration data has been changed.voidorganizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int type)This method will be invoked when a service's organization configuration data has been changed.voidschemaChanged(String serviceName, String version)This method will be invoked when a service's schema has been changed.
-
-
-
Constructor Detail
-
OAuth2ProviderSettingsFactory
@Inject public OAuth2ProviderSettingsFactory(ResourceSetStoreFactory resourceSetStoreFactory, OAuth2RealmResolver realmResolver, ServiceConfigManagerFactory serviceConfigManagerFactory)
Constructs a newOpenAMOAuth2ProviderSettingsFactoryinstance.- Parameters:
resourceSetStoreFactory- Factory for creatingResourceSetStoreinstances.realmResolver- Used to resolve the realm.serviceConfigManagerFactory- Factory for creatingServiceConfigManagerinstances.
-
-
Method Detail
-
getRealmProviderSettings
public OAuth2ProviderSettings getRealmProviderSettings(String realm) throws NotFoundException
Gets the instance of the OAuth2ProviderSettings defined in the realm.- Parameters:
realm- The realm.- Returns:
- The OAuth2ProviderSettings instance.
- Throws:
NotFoundException
-
get
public OAuth2ProviderSettings get(org.forgerock.services.context.Context context) throws NotFoundException
Gets the instance of the OAuth2ProviderSettings.- Parameters:
context- The context that can be used to obtain the base deployment url.- Returns:
- The OAuth2ProviderSettings instance.
- Throws:
NotFoundException
-
get
public OAuth2ProviderSettings get(OAuth2Request request) throws NotFoundException
Gets the instance of the OAuth2ProviderSettings- Parameters:
request- The OAuth2 request.- Returns:
- The OAuth2ProviderSettings instance.
- Throws:
NotFoundException
-
schemaChanged
public void schemaChanged(String serviceName, String version)
Description copied from interface:ServiceListenerThis method will be invoked when a service's schema has been changed.- Specified by:
schemaChangedin interfaceServiceListener- Parameters:
serviceName- name of the serviceversion- version of the service
-
globalConfigChanged
public void globalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int type)
Description copied from interface:ServiceListenerThis method will be invoked when a service's global configuration data has been changed. The parametergroupNamedenote the name of the configuration grouping (e.g. default) andserviceComponentdenotes the service's sub-component that changed (e.g./NamedPolicy,/Templates).- Specified by:
globalConfigChangedin interfaceServiceListener- Parameters:
serviceName- name of the service.version- version of the service.groupName- name of the configuration grouping.serviceComponent- name of the service components that changed.type- change type, i.e., ADDED, REMOVED or MODIFIED.
-
organizationConfigChanged
public void organizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int type)
Description copied from interface:ServiceListenerThis method will be invoked when a service's organization configuration data has been changed. The parametersorgName,groupNameandserviceComponentdenotes the organization name, configuration grouping name and service's sub-component that are changed respectively.- Specified by:
organizationConfigChangedin interfaceServiceListener- Parameters:
serviceName- name of the serviceversion- version of the serviceorgName- organization name as DNgroupName- name of the configuration groupingserviceComponent- the name of the service components that changedtype- change type, i.e., ADDED, REMOVED or MODIFIED
-
-