Introduction
Since the introduction of Spring Security 6, I have encountered many developers who experienced issues getting their heads ...
For further actions, you may consider blocking this person and/or reporting abuse
in the main method you need to change from this
public CommandLineRunner initializeUser(UserRepository userRepository, BCryptPasswordEncoder passwordEncoder)to this
public CommandLineRunner initializeUser(UserRepository userRepository, PasswordEncoder passwordEncoder)if you pass a BCryptPasswordEncoder in the parameter you will get an error
Hello, thank you for this tutorial. When I try to retrieve the name of the authenticated user ( SecurityContextHolder.getContext().getAuthentication().getName() ) I get Null what should I do to solve this problem?
hello gontran, have you be able to generate public and private RSA keys successfully?
you getting NULL, there could be many possibilities:
ERROR: "User account is locked"
hi, please check your code in AuthUser, probably you wrote something wrong. i had the same problem and i checked my error in that class. i hope you can resolve your error. greetings
yep @andreschile87 is correct. Change return types to true of all the methods that we are overiding which came from UserDetails interface .
configure cors if requests are not working on postman
Fantastic guide!
I am kinda stuck at RSA public and private key generation!!!
The commands you have written up are not working for me! is there any other way?
*in his github code there's a little difference:
*
*maybe thats why the command is not working, you can try replace the command
*
for