November 2017
Intermediate to advanced
542 pages
14h 24m
English
The only thing left to do is configure Spring Security to use the new artifacts.
We need to edit the DefaultCalendarService.java file and only remove the remaining code that was used to add USER_ROLE to any new User object that was created as follows:
//com/packtpub/springsecurity/service/DefaultCalendarService.java package com.packtpub.springsecurity.service; ... omitted for brevity ... @Repository public class DefaultCalendarService implements CalendarService { @Override public int createUser(CalendarUser user) { String encodedPassword = passwordEncoder.encode(user.getPassword()); user.setPassword(encodedPassword); int userId = userDao.createUser(user); //jdbcOperations.update("insert into calendar_user_authorities(calendar_user,authority) ...Read now
Unlock full access