title: Process JWT token using JWKs Endpoint
body: <p>I receive two JWTs: an OpenID Connect ID token (id_token) and an Access Token (access_token). The situation with OpenID is more or less clear - I can validate it using a JWKS Endpoint: <a href="https://smth.com/JWKS" rel="nofollow noreferrer">https://smth.com/JWKS</a>.</p>
  <p>as in example (<a href="https://bitbucket.org/b_c/jose4j/wiki/JWT%20Examples" rel="nofollow noreferrer">https://bitbucket.org/b_c/jose4j/wiki/JWT%20Examples</a>):</p>
  <pre><code>HttpsJwks httpsJkws = new HttpsJwks(&quot;https://smth.com/JWKS&quot;);
  HttpsJwksVerificationKeyResolver httpsJwksKeyResolver = new HttpsJwksVerificationKeyResolver(httpsJkws);
  jwtConsumer = new JwtConsumerBuilder()
      .setVerificationKeyResolver(httpsJwksKeyResolver)
      .setExpectedAudience(...)
      .setExpectedIssuer(...)
      .build();
  </code></pre>
  <p>The question is how to proceed with the Access Token. I can extract from it the userId and userDetails, but I guess I need also to validate it?</p>
  <p>If I try to validate the Access Token the same as for the ID Token, I am getting this error:</p>
  <blockquote>
  <p>UnresolvableKeyException: Unable to find a suitable verification key for JWS w/ header {&quot;alg&quot; : &quot;RS256&quot;, &quot;kid&quot;:&quot;1&quot;}</p>
  </blockquote>
  <p>And indeed there is no key for <code>&quot;kid&quot; : &quot;1&quot;</code>, Also this value <code>&quot;1&quot;</code> seems kind of strange?</p>
  <p>Am I doing something totally wrong?</p>