title: GOLANG load JWK (JSON Web Keys), from memory not loading from a URL ? Fetch
body: <p>I'm using "github.com/lestrrat/go-jwx/jwk" to Validate Jason Web Tokens (JWT). <a href="https://github.com/lestrrat/go-jwx" rel="nofollow noreferrer">https://github.com/lestrrat/go-jwx</a></p>
  
  <p>The JWK Library has a great function to load keys from a URL, but this would be running in a serverless environment, so I want to cache the keys rather than fetching them like this:</p>
  
  <pre><code>set, err := jwk.Fetch(keyUrl)
  </code></pre>
  
  <p>I'm trying to figure out how to load them directly, or create them from the keys I already have.</p>
  
  <p>The keys are the JSON format.</p>
  
  <pre><code>{"keys":
  [{"alg":"RS256","e":"AQAB","n":"jqm5oX5Vth4JW1gZQHywIki2beYCgBSL-
  EYlefDUlI6SShtEKfi-vWYbFh2pNNUAE4NHuYpYP-
  FG1uRSKs6WK2k6KMB2Hyx3hBkWyu7Aqo_pb1WItkPSZS-AWOMp4N-
  </code></pre>
  
  <p>I just can't find an example of how to do this. There must be a way</p>