Understanding authentication providers

You can have multiple AuthenticationProvider interfaces configured. Each authentication provider talks with a different data store or api authentication.

The AuthenticationProvider interface is shown here:

public interface AuthenticationProvider {
Authentication authenticate(Authentication authentication)
throws AuthenticationException;
boolean supports(Class << ? > authentication);
}

You can have different AuthenticationProvider interfaces. One talking to a database; another to a LDAP. Typically, you will have one authentication provider talking to your user credentials database or your security api.

DaoAuthenticationProvider is one of the default implementations of AuthenticationProvider, provided by Spring Security. It talks to something called UserDetailsService, to retrieve the user details based on the username.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset