Providing UserCache to AuthenticationProvider

Now, we will provide the created UserCache bean to AuthenticationProvider:

@Bean
public AuthenticationProvider authenticationProviderBean() {
DaoAuthenticationProvider authenticationProvider = new
DaoAuthenticationProvider();
authenticationProvider.setPasswordEncoder(passwordEncoder);
authenticationProvider.setUserCache(userCache);
authenticationProvider.
setUserDetailsService(userDetailsService());
return authenticationProvider;
}
..................Content has been hidden....................

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