Class AuthConfigFactoryImpl
- java.lang.Object
-
- jakarta.security.auth.message.config.AuthConfigFactory
-
- org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl
-
public class AuthConfigFactoryImpl extends AuthConfigFactory
Implementation ofAuthConfigFactoryfor the JASPIC authentication framework.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jakarta.security.auth.message.config.AuthConfigFactory
AuthConfigFactory.RegistrationContext
-
-
Field Summary
-
Fields inherited from class jakarta.security.auth.message.config.AuthConfigFactory
DEFAULT_FACTORY_SECURITY_PROPERTY, GET_FACTORY_PERMISSION_NAME, getFactorySecurityPermission, PROVIDER_REGISTRATION_PERMISSION_NAME, providerRegistrationSecurityPermission, SET_FACTORY_PERMISSION_NAME, setFactorySecurityPermission
-
-
Constructor Summary
Constructors Constructor Description AuthConfigFactoryImpl()Constructs a new AuthConfigFactoryImpl and loads any persistent registrations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]detachListener(RegistrationListener listener, java.lang.String layer, java.lang.String appContext)Detaches a listener from all registrations matching the given layer and application context, returning the affected registration IDs.AuthConfigProvidergetConfigProvider(java.lang.String layer, java.lang.String appContext, RegistrationListener listener)Returns theAuthConfigProviderfor the specified message layer and application context.AuthConfigFactory.RegistrationContextgetRegistrationContext(java.lang.String registrationID)Returns theAuthConfigFactory.RegistrationContextfor the given registration ID.java.lang.String[]getRegistrationIDs(AuthConfigProvider provider)Returns the registration IDs associated with the given AuthConfigProvider.voidrefresh()Refreshes all registered AuthConfigProviders, causing them to reload their configuration.java.lang.StringregisterConfigProvider(AuthConfigProvider provider, java.lang.String layer, java.lang.String appContext, java.lang.String description)Registers an AuthConfigProvider instance.java.lang.StringregisterConfigProvider(java.lang.String className, java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String layer, java.lang.String appContext, java.lang.String description)Registers an AuthConfigProvider by class name with the given properties.java.lang.StringregisterServerAuthModule(ServerAuthModule serverAuthModule, java.lang.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(java.lang.String registrationID)Removes a registration by its ID.voidremoveServerAuthModule(java.lang.Object context)Convenience method for deregistering aServerAuthModulethat should have the same effect as callingAuthConfigFactory.removeRegistration(String).-
Methods inherited from class jakarta.security.auth.message.config.AuthConfigFactory
getFactory, setFactory
-
-
-
-
Method Detail
-
getConfigProvider
public AuthConfigProvider getConfigProvider(java.lang.String layer, java.lang.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 java.lang.String registerConfigProvider(java.lang.String className, java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String layer, java.lang.String appContext, java.lang.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 java.lang.String registerConfigProvider(AuthConfigProvider provider, java.lang.String layer, java.lang.String appContext, java.lang.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
public boolean removeRegistration(java.lang.String registrationID)
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
public java.lang.String[] detachListener(RegistrationListener listener, java.lang.String layer, java.lang.String appContext)
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
public java.lang.String[] getRegistrationIDs(AuthConfigProvider provider)
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
public AuthConfigFactory.RegistrationContext getRegistrationContext(java.lang.String registrationID)
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
public java.lang.String registerServerAuthModule(ServerAuthModule serverAuthModule, java.lang.Object context)
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
public void removeServerAuthModule(java.lang.Object context)
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
-
-