November 2017
Intermediate to advanced
542 pages
14h 24m
English
The passwordEncoder() method we defined previously is smart enough to handle the new password encoder interface. However, DefaultCalendarUserService needs to update to the new interface. Make the following updates to the DefaultCalendarUserService class:
//src/main/java/com/packtpub/springsecurity/service/DefaultCalendarService.java import org.springframework.security.authentication.encoding.PasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; // other imports omitted public class DefaultCalendarService implements CalendarService { ... public int createUser(CalendarUser user) { String encodedPassword = passwordEncoder.encode(user.getPassword()); user.setPassword(encodedPassword); ...Read now
Unlock full access