public class ProviderRegistryImpl extends Object implements PrincipalProviderRegistry
PrincipalProviderRegistry
interface.Constructor and Description |
---|
ProviderRegistryImpl(PrincipalProvider defaultPrincipalProvider)
Create an instance of
ProviderRegistryImpl with the given
default principal provider. |
Modifier and Type | Method and Description |
---|---|
PrincipalProvider |
getDefault() |
PrincipalProvider |
getProvider(String className) |
PrincipalProvider[] |
getProviders()
Returns all registered providers.
|
PrincipalProvider |
registerProvider(Properties config)
Registers a new provider by means of a configuration.
|
public ProviderRegistryImpl(PrincipalProvider defaultPrincipalProvider)
ProviderRegistryImpl
with the given
default principal provider.
NOTE that the provider must be initialized by the caller.defaultPrincipalProvider
- The default principal provider.public PrincipalProvider registerProvider(Properties config) throws RepositoryException
PrincipalProviderRegistry
LoginModuleConfig.PARAM_PRINCIPAL_PROVIDER_CLASS
to be able to create a instance of PrincipalProvider.
The Properties will be passed to the instantiated Provider via
PrincipalProvider.init(Properties)
registerProvider
in interface PrincipalProviderRegistry
config
- Properties for the Providernull
if the configuration
was incomplete.RepositoryException
- if an error occurs while creating the
provider instance.PrincipalProviderRegistry.registerProvider(Properties)
public PrincipalProvider getDefault()
getDefault
in interface PrincipalProviderRegistry
PrincipalProviderRegistry.getDefault()
public PrincipalProvider getProvider(String className)
getProvider
in interface PrincipalProviderRegistry
className
- Name of the principal provider class.null
if no provider with
the given class name was registered.PrincipalProviderRegistry.getProviders()
public PrincipalProvider[] getProviders()
PrincipalProviderRegistry
getProviders
in interface PrincipalProviderRegistry
PrincipalProviderRegistry.getProviders()
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.