Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public class ProviderManager
- Object
- ProviderManager
ImplementsAuthenticationManager
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.Constructors
Methods
public List<AuthenticationProvider> getProviders() | The providers, in the order they are asked. |
public void setEraseCredentialsAfterAuthentication(boolean erase) | Whether an accepted token has its password dropped before it is returned; true unless changed. |
public Authentication authenticate(Authentication authentication) | The accepted authentication, with its authorities. |
Inherited methods
Constructor details
ProviderManager
public ProviderManager(AuthenticationProvider... providers)ProviderManager
public ProviderManager(List<AuthenticationProvider> providers)ProviderManager
public ProviderManager(List<AuthenticationProvider> providers, AuthenticationManager parent)Parameters
providersList<AuthenticationProvider>- Not documented.
parentAuthenticationManager- asked when no provider here supports the token or accepts it
Method details
getProviders
public List<AuthenticationProvider> 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
public Authentication authenticate(Authentication authentication)The accepted authentication, with its authorities.
Throws
AuthenticationException- when it is not accepted – a
BadCredentialsException, aDisabledException, aLockedException