title: Why do we need to call http.addFilterBefore() method in spring security configure(HttpSecurity http) method?
body: <p>I am trying to understand why do we usually need to call http.addFilterBefore(jwtAuthenticationFilter(),UsernamePasswordAuthenticationFilter.class) method in the initial configure(HttpSecurity http) method?
  As i understood it will firstly add a result from jwtAuthenticationFilter() and then UsernamePasswordAuthenticationFilter but i am not sure why?
  jwtAuthenticationFilter() implementation : </p>
  
  <pre><code>@Override
  protected  void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {
          authenticationManagerBuilder.userDetailsService(customerService).passwordEncoder(bCryptPasswordEncoder());
      }
  
  </code></pre>
  
  <p>Also is it that the security class that extends WebSecurityConfigurerAdapter will only be called once on startup?</p>