Class DynamicProviderManagerImpl
java.lang.Object
org.springframework.security.authentication.ProviderManager
com.atlassian.crowd.integration.springsecurity.DynamicProviderManagerImpl
- All Implemented Interfaces:
DynamicProviderManager
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.MessageSourceAware
,org.springframework.security.authentication.AuthenticationManager
public class DynamicProviderManagerImpl
extends org.springframework.security.authentication.ProviderManager
implements DynamicProviderManager
An extension to the standard ProviderManager implementation
of the AuthenticationManager which allows adding and removing
provider managers at runtime.
This ensures that the provider manager is threadsafe (to some degree). It is still possible to obtain a collection of providers and manipulate it in a non-threadsafe manner by using the getter/setter.
Note: if you have no need for runtime-pluggable behaviour, simply use org.springframework.security.providers.ProviderManager.
-
Field Summary
Fields inherited from class org.springframework.security.authentication.ProviderManager
messages
-
Constructor Summary
ConstructorDescriptionDynamicProviderManagerImpl
(List<org.springframework.security.authentication.AuthenticationProvider> providers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProvider
(org.springframework.security.authentication.AuthenticationProvider provider) org.springframework.security.core.Authentication
authenticate
(org.springframework.security.core.Authentication authentication) boolean
removeProvider
(org.springframework.security.authentication.AuthenticationProvider provider) Methods inherited from class org.springframework.security.authentication.ProviderManager
afterPropertiesSet, getProviders, isEraseCredentialsAfterAuthentication, setAuthenticationEventPublisher, setEraseCredentialsAfterAuthentication, setMessageSource
-
Constructor Details
-
DynamicProviderManagerImpl
public DynamicProviderManagerImpl() -
DynamicProviderManagerImpl
public DynamicProviderManagerImpl(List<org.springframework.security.authentication.AuthenticationProvider> providers)
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticate
in interfaceorg.springframework.security.authentication.AuthenticationManager
- Overrides:
authenticate
in classorg.springframework.security.authentication.ProviderManager
- Throws:
org.springframework.security.core.AuthenticationException
-
addProvider
public void addProvider(org.springframework.security.authentication.AuthenticationProvider provider) - Specified by:
addProvider
in interfaceDynamicProviderManager
-
removeProvider
public boolean removeProvider(org.springframework.security.authentication.AuthenticationProvider provider) - Specified by:
removeProvider
in interfaceDynamicProviderManager
-