lib/openid_connect/discovery/provider/config/response.rb in openid_connect-1.3.1 vs lib/openid_connect/discovery/provider/config/response.rb in openid_connect-1.4.0
- old
+ new
@@ -85,9 +85,14 @@
OpenIDConnect.http_client.get_content(jwks_uri)
).with_indifferent_access
JSON::JWK::Set.new @jwks[:keys]
end
+ def jwk(kid)
+ @jwks ||= {}
+ @jwks[kid] ||= JSON::JWK::Set::Fetcher.fetch(jwks_uri, kid: kid)
+ end
+
def public_keys
@public_keys ||= jwks.collect(&:to_key)
end
private