vmaric vmaric - 21 days ago 4x
reST (reStructuredText) Question

Configure Security at Spring Boot

I'm pretty new in the spring-boot. I'm trying to make a REST service with mongodb in backend. In mongodb I made the Customers table and sekond users table. In the users table I defined column for the username, password, and roles as a series. Trying to authenticate users who accesses on REST service, from table user.
On the Internet I found two cases when we extend WebSecurityConfigurerAdapter or second way when we extend GlobalAuthenticationConfigurerAdapter. In first case I have bean found example on web where we make custom AuthenticationProvider, but in second way we deal with UserDetailsSerivce.
My question is how I can dive deeper into this issue?
Even watching in source cod of huge interfaces end classes i can not do those staff differently as in a tutorial.
And what is main difference between these two way?
Who handle or how handle Spring-boot security?(is there something like a dispatcher servlet who handles MVC?)


@vmaric i haven't use it, but looks like logic is the same:

public class AuthenticationManagerConfiguration extends
        GlobalAuthenticationConfigurerAdapter {

    public void init(AuthenticationManagerBuilder auth) {
        auth.inMemoryAuthentication() // ... etc. <-------