title: Spring default Authentication internal working
body: <p>I just started learning Spring and Spring Security and I have created a simple project by reading Spring Security documentation. I done the following java based configuration.</p>
  
  <pre><code>@Configuration
  @EnableWebSecurity
  public class SecurityConfig extends WebSecurityConfigurerAdapter {
  
      @Autowired
      public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
          auth
              .inMemoryAuthentication()
              .withUser("admin")
              .password("nimda")
              .roles("ADMIN");
      }
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
  
          http.authorizeRequests()
              .antMatchers("/").permitAll() 
              .antMatchers("/admin**").access("hasRole('ADMIN')")
              .and().formLogin();
  
          http.csrf().disable();
      }
  }
  </code></pre>
  
  <p>When I go for "/admin" it redirect me to the login page which I know spring generated with this default configuration and after login it will show the login page. Now my question is: login form is posted to "/login" and I did not defined any "AuthenticationManager" and "UserDetailService" which I read in documentation for custom configuration then how spring post the form and do the login process? Basically I want to know some detail of inner working of this default login process.</p>