title: Invalid JWToken: kid is a required JOSE Header
body: <p>I am trying to implement an Oauth2 Authorization Server with SpringBoot using this <a href="https://docs.spring.io/spring-security-oauth2-boot/docs/current-SNAPSHOT/reference/htmlsingle/" rel="nofollow noreferrer">guide</a> as a reference.</p>
  
  <p>My keystore has a single key. I have successfully managed to create a JWToken (I can check it at jwt.io).</p>
  
  <p>I have also a test Resource Server. When I try to access any endpoint I receive the following message:</p>
  
  <pre><code>{
    "error": "invalid_token",
    "error_description": "Invalid JWT/JWS: kid is a required JOSE Header"
  }
  </code></pre>
  
  <p>The token really does not have a kid header but I can not figure out how to add it. I can only add data to its payload, using a TokenEnchancer. It also seems that I am not the first one <a href="https://stackoverflow.com/questions/53982192/using-spring-security-oauth2-authorization-server-with-kid-and-jwks">with this issue</a>.</p>
  
  <p>Is there any way to add this header or, at least, ignore it at the resource server?</p>