title: PrincipalExtractor and AuthoritiesExtractor are not getting called
body: <p>I have a simple OAuth2 application. I started off by creating a SecurityConfig extending WebSecurityConfigurerAdapter and annotated with @EnableOAuth2Sso. I've created an API as well in a controller to test if authentication is working. Principal gets injected into the controller and it gives the correct name.</p>
  
  <p>I'm now trying to add some authorities to the principal by implementing AuthoritiesExtractor and creating it as bean. I also did the same with PrincipalExtractor to check if it is working. None of them are getting called while making any request from the browser.</p>
  
  <p><strong>Edit: This is actually doing only authentication with OIDC and hence my client and resources are on the same application.</strong></p>
  
  <p>// This is my security configuration class.</p>
  
  <pre><code>@Configuration
  @EnableOAuth2Sso
  public class SecurityConfig extends WebSecurityConfigurerAdapter {
  
  @Override
  public void configure(HttpSecurity http) throws Exception {
       http
       .antMatcher("/**")
       .authorizeRequests()
         .antMatchers("/login**","/error**")
         .permitAll()
       .anyRequest()
         .authenticated();
  }
  
  @Bean
  public PrincipalExtractor principalExtractor() {
      return map -&gt; {
          System.out.println("Principal extracted.");
          User user = new User();
          user.setUsername((String)map.get("username"));
          return user;
      };
  }
  
  @Bean
  public AuthoritiesExtractor authoritiesExtractor() {
      return new PrismAuthoritiesExtractor();
  }
  }
  </code></pre>
  
  <p>// And this is my AuthoritiesExtractor class defined separately just to check if doing so works.</p>
  
  <pre><code>public class PrismAuthoritiesExtractor implements AuthoritiesExtractor {
  
  @Override
  public List&lt;GrantedAuthority&gt; extractAuthorities(Map&lt;String, Object&gt; map) {
      return AuthorityUtils.commaSeparatedStringToAuthorityList("AUTH1,AUTH2");
  }
  }
  </code></pre>