I want to create Sign Up with Spring Security.
It has login(), logout(), but how does Spring perform register request with security? I have no login, password when I do it. So I need to disable authorization for this page.
So, I need something like:
http
.authorizeRequests()
.antMatchers("/register").iHaveNoLogin().iHaveNoPassword().iHaveNothing();
Fixed. I just marked only selected pages as authorized:
http
.authorizeRequests()
.antMatchers("/secured_pages**") ...
And other pages do not require authorization.
Spring Security does not provide a registration page for you. You have to do it yourself. It's not a complicated form to make yourself.
They are nice enough to supply the JdbcUserDetailsManager, and its createUser method, which can make it fast and simple to create a user in your database.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments