title: Java com.nimbusds.jose.jwk.JWKSet with custom field
body: <p>I have a client sending in a JWKS like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;keys&quot;: [
      &quot;kty&quot;: &quot;RSA&quot;,
      &quot;use&quot;: &quot;sig&quot;,
      &quot;alg&quot;: &quot;RS256&quot;,
      &quot;kid&quot;: &quot;...&quot;,
      &quot;x5t&quot;: &quot;...&quot;,
      &quot;custom_field_1&quot;: &quot;this is some content&quot;,
      &quot;custom_field_2&quot;: &quot;this is some content, too&quot;,
      &quot;n&quot;: &quot;...&quot;,
      &quot;x5c&quot;: &quot;...&quot;
    ]
  }
  </code></pre>
  <p>Using the <a href="https://javadoc.io/doc/com.nimbusds/nimbus-jose-jwt/8.0/com/nimbusds/jose/jwk/JWKSet.html" rel="nofollow noreferrer">com.nimbusds.jose.jwk.JWKSet</a>, I'd like to rip through the keys via the <code>getKeys()</code> method, which gives me <a href="https://javadoc.io/doc/com.nimbusds/nimbus-jose-jwt/8.0/com/nimbusds/jose/jwk/JWK.html" rel="nofollow noreferrer">com.nimbusds.jose.jwk.JWK</a> objects and read those custom fields. I need to perform some custom logic based on these fields.</p>
  <p>Is there a way to do this?</p>