Default implementation of the AuthenticationManager. The AuthenticationManager follows the following algorithm. The manager loops through the array of AuthenticationHandlers searching for one that can attempt to determine the validity of the credentials. If it finds one, it tries that one. If that handler returns true, it continues on. If it returns false, it looks for another handler. If it throws an exception, it aborts the whole process and rethrows the exception. Next, it looks for a CredentialsToPrincipalResolver that can handle the credentials in order to create a Principal. Finally, it attempts to populate the Authentication object's attributes map using AuthenticationAttributesPopulators
Behavior is determined by external beans attached through three configuration properties. The Credentials are opaque to the manager. They are passed to the external beans to see if any can process the actual type represented by the Credentials marker.
AuthenticationManagerImpl requires the following properties to be set:
authenticationHandlers
- The array of AuthenticationHandlers that know how to process the credentials provided. credentialsToPrincipalResolvers
- The array of CredentialsToPrincipal resolvers that know how to process the credentials provided.
|
|
|
|
|
|