title: Load different authentication provider for certain url
body: <p>I want to load different authentication providers for different urls. For example, if I have url matching "/foo/something", then load FooProvider and for "bar/something" -> BarProvider. The problem is that when I hit "bar/something" url, the sessionScope parameter (I pass it in constructor of provider) is still "foo". That means, FooProvider is loaded, but this is not what I expect. 
  Is there something I'm missing? Thanks in advance. </p>
  
  <pre><code> abstract class TokenAuthenticationProvider (
          protected val sessionScope: SessionScope
      ) : AuthenticationProvider { 
  
      private fun authenticateToken(authentication: TokenAuthentication): Authentication { 
          println("sessionScope $sessionScope")
      }
  }
  
  @Component
  class FooAuthenticationProvider : TokenAuthenticationProvider (sessionScope = SessionScope.Foo)
  
  @Component
  class BarAuthenticationProvider : TokenAuthenticationProvider (sessionScope = SessionScope.Bar)
  
  
  @Configuration
  @EnableWebSecurity
  class WebSecurityConfiguration @Autowired constructor(
      private val fooProvider: FooProvider,
      private val barProvider: BarProvider,
      private val authFilter: AuthFilter,
      private val corsFilter: CustomCorsFilter
  ) : WebSecurityConfigurerAdapter() {
  
      override fun configure(http: HttpSecurity) {
  
          ... 
  
          http.authorizeRequests()
              .antMatchers("foo/**")
              .fullyAuthenticated()
              .and()
              .authenticationProvider(fooProvider)
  
          http.authorizeRequests()
              .antMatchers("bar/**")
              .fullyAuthenticated()
              .and()
              .authenticationProvider(barProvider)
  
            ... 
      }
  
      override fun configure(auth: AuthenticationManagerBuilder) {
          auth.authenticationProvider(fooProvider)
          auth.authenticationProvider(barProvider)
      }
  }
  </code></pre>