title: Spring Boot Security PermitAll with RequestHeaderMatcher not working
body: <p>After having followed a tutorial about microserves and OAuth2 in Maven Spring Boot, I got a problem. I want to exclude a request from the authentication, so unauthorized data can be gotten. This only doesn't seem to work in the way I do it. Can someone help me with this?</p>
  
  <p>Tutorial I followed: <a href="https://developer.okta.com/blog/2018/02/13/secure-spring-microservices-with-oauth#microservices-architectures-with-spring-boot--spring-cloud" rel="nofollow noreferrer">https://developer.okta.com/blog/2018/02/13/secure-spring-microservices-with-oauth#microservices-architectures-with-spring-boot--spring-cloud</a></p>
  
  <p>What I tried:</p>
  
  <pre><code>@Configuration
  @EnableResourceServer
  public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
  
      @Override
      public void configure(HttpSecurity http) throws Exception {
          http.requestMatcher(new RequestHeaderRequestMatcher("Authorization"))
                  .authorizeRequests()
                  .antMatchers("/**").authenticated()
                  .and()
                  .authorizeRequests()
                  .andMatchers(HttpMethod.GET, "/beers").permitAll();
      }
  }
  </code></pre>
  
  <p>I have to authenticate when I try to do the request. How do I solve this?</p>
  
  <p>spring-security-oauth2-autoconfigure: 2.1.1.RELEASE</p>