We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In order to create the authentication token at the SecurityServiceImpl class, it's needed to pass to the constructor the password in plain text.
I recommend saving the password in registration mapping and then pass it to autologin.
Example:
@PostMapping("/registration") public String registration(@ModelAttribute("userForm") User userForm, BindingResult bindingResult) { String pw = userForm.getPassword(); userValidator.validate(userForm, bindingResult); if (bindingResult.hasErrors()) { return "registration"; } userService.save(userForm); securityService.autoLogin(userForm.getUsername(), pw); return "redirect:/welcome"; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In order to create the authentication token at the SecurityServiceImpl class, it's needed to pass to the constructor the password in plain text.
I recommend saving the password in registration mapping and then pass it to autologin.
Example:
The text was updated successfully, but these errors were encountered: