November 2017
Intermediate to advanced
542 pages
14h 24m
English
The application has a SignupController object, which is what processes the HTTP request to create a new CalendarUser object. The last step is to update SignupController to create our user and then indicate that they are logged in. Make the following updates to SignupController:
//src/main/java/com/packtpub/springsecurity/web/controllers/SignupController.java@RequestMapping(value="/signup/new", method=RequestMethod.POST)public String signup(@Valid SignupForm signupForm,BindingResult result, RedirectAttributes redirectAttributes) {... existing validation …user.setPassword(signupForm.getPassword());int id = calendarService.createUser(user);user.setId(id);userContext.setCurrentUser(user);redirectAttributes.addFlashAttribute("message", ...Read now
Unlock full access