Class AuthConfigFactoryImpl
java.lang.Object
jakarta.security.auth.message.config.AuthConfigFactory
org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl
Implementation of
AuthConfigFactory for the JASPIC authentication framework.-
Nested Class Summary
Nested classes/interfaces inherited from class AuthConfigFactory
AuthConfigFactory.RegistrationContext -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new AuthConfigFactoryImpl and loads any persistent registrations. -
Method Summary
Modifier and TypeMethodDescriptionString[]detachListener(RegistrationListener listener, String layer, String appContext) Detaches a listener from all registrations matching the given layer and application context, returning the affected registration IDs.getConfigProvider(String layer, String appContext, RegistrationListener listener) Returns theAuthConfigProviderfor the specified message layer and application context.getRegistrationContext(String registrationID) Returns theAuthConfigFactory.RegistrationContextfor the given registration ID.String[]getRegistrationIDs(AuthConfigProvider provider) Returns the registration IDs associated with the given AuthConfigProvider.voidrefresh()Refreshes all registered AuthConfigProviders, causing them to reload their configuration.registerConfigProvider(AuthConfigProvider provider, String layer, String appContext, String description) Registers an AuthConfigProvider instance.registerConfigProvider(String className, Map<String, String> properties, String layer, String appContext, String description) Registers an AuthConfigProvider by class name with the given properties.registerServerAuthModule(ServerAuthModule serverAuthModule, Object context) Convenience method for registering aServerAuthModulethat should have the same effect as callingAuthConfigFactory.registerConfigProvider(AuthConfigProvider, String, String, String)with the implementation providing the appropriateAuthConfigProvidergenerated from the provided context.booleanremoveRegistration(String registrationID) Removes a registration by its ID.voidremoveServerAuthModule(Object context) Convenience method for deregistering aServerAuthModulethat should have the same effect as callingAuthConfigFactory.removeRegistration(String).Methods inherited from class AuthConfigFactory
getFactory, setFactory
-
Constructor Details
-
AuthConfigFactoryImpl
public AuthConfigFactoryImpl()Constructs a new AuthConfigFactoryImpl and loads any persistent registrations.
-
-
Method Details
-
getConfigProvider
public AuthConfigProvider getConfigProvider(String layer, String appContext, RegistrationListener listener) Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryReturns theAuthConfigProviderfor the specified message layer and application context.- Specified by:
getConfigProviderin classAuthConfigFactory- Parameters:
layer- the message layerappContext- the application contextlistener- the registration listener to attach- Returns:
- the AuthConfigProvider, or
nullif none is available
-
registerConfigProvider
public String registerConfigProvider(String className, Map<String, String> properties, String layer, String appContext, String description) Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryRegisters an AuthConfigProvider by class name with the given properties.- Specified by:
registerConfigProviderin classAuthConfigFactory- Parameters:
className- the fully qualified class name of the AuthConfigProviderproperties- the configuration propertieslayer- the message layerappContext- the application contextdescription- a description of the registration- Returns:
- a unique registration ID
-
registerConfigProvider
public String registerConfigProvider(AuthConfigProvider provider, String layer, String appContext, String description) Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryRegisters an AuthConfigProvider instance.- Specified by:
registerConfigProviderin classAuthConfigFactory- Parameters:
provider- the AuthConfigProvider to registerlayer- the message layerappContext- the application contextdescription- a description of the registration- Returns:
- a unique registration ID
-
removeRegistration
Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryRemoves a registration by its ID.- Specified by:
removeRegistrationin classAuthConfigFactory- Parameters:
registrationID- the registration ID to remove- Returns:
trueif the registration was removed,falseif it did not exist
-
detachListener
Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryDetaches a listener from all registrations matching the given layer and application context, returning the affected registration IDs.- Specified by:
detachListenerin classAuthConfigFactory- Parameters:
listener- the listener to detachlayer- the message layerappContext- the application context- Returns:
- an array of registration IDs from which the listener was detached
-
getRegistrationIDs
Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryReturns the registration IDs associated with the given AuthConfigProvider.- Specified by:
getRegistrationIDsin classAuthConfigFactory- Parameters:
provider- the AuthConfigProvider- Returns:
- an array of registration IDs
-
getRegistrationContext
Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryReturns theAuthConfigFactory.RegistrationContextfor the given registration ID.- Specified by:
getRegistrationContextin classAuthConfigFactory- Parameters:
registrationID- the registration ID- Returns:
- the RegistrationContext, or
nullif the ID is not found
-
refresh
public void refresh()Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryRefreshes all registered AuthConfigProviders, causing them to reload their configuration.- Specified by:
refreshin classAuthConfigFactory
-
registerServerAuthModule
Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryConvenience method for registering aServerAuthModulethat should have the same effect as callingAuthConfigFactory.registerConfigProvider(AuthConfigProvider, String, String, String)with the implementation providing the appropriateAuthConfigProvidergenerated from the provided context.- Specified by:
registerServerAuthModulein classAuthConfigFactory- Parameters:
serverAuthModule- TheServerAuthModuleto registercontext- The associated application context- Returns:
- A string identifier for the created registration
-
removeServerAuthModule
Description copied from class:jakarta.security.auth.message.config.AuthConfigFactoryConvenience method for deregistering aServerAuthModulethat should have the same effect as callingAuthConfigFactory.removeRegistration(String).- Specified by:
removeServerAuthModulein classAuthConfigFactory- Parameters:
context- The associated application context
-