Class ProviderManager
java.lang.Object
com.codename1.backend.security.ProviderManager
- All Implemented Interfaces:
AuthenticationManager
An
AuthenticationManager that asks a list of AuthenticationProviders in
order and takes the first answer. A refusal that says the account itself is
unusable -- locked, disabled, expired -- ends the search; any other is
remembered while the remaining providers are tried, and thrown when none
accepts.-
Constructor Summary
ConstructorsConstructorDescriptionProviderManager(AuthenticationProvider... providers) ProviderManager(List<AuthenticationProvider> providers) ProviderManager(List<AuthenticationProvider> providers, AuthenticationManager parent) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Authentication authentication) The accepted authentication, with its authorities.The providers, in the order they are asked.voidsetEraseCredentialsAfterAuthentication(boolean erase) Whether an accepted token has its password dropped before it is returned; true unless changed.
-
Constructor Details
-
ProviderManager
-
ProviderManager
-
ProviderManager
- Parameters:
parent- asked when no provider here supports the token or accepts it
-
-
Method Details
-
getProviders
The providers, in the order they are asked. -
setEraseCredentialsAfterAuthentication
public void setEraseCredentialsAfterAuthentication(boolean erase) Whether an accepted token has its password dropped before it is returned; true unless changed. -
authenticate
Description copied from interface:AuthenticationManagerThe accepted authentication, with its authorities.
Throws
AuthenticationException: when it is not accepted -- aBadCredentialsException, aDisabledException, aLockedException
- Specified by:
authenticatein interfaceAuthenticationManager
-