Module: JSON::JOSE
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#with_jwk_support(key) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/json/jose.rb', line 23 def with_jwk_support(key) case key when JSON::JWK key.to_key when JSON::JWK::Set key.detect do |jwk| jwk[:kid] && jwk[:kid] == kid end.try(:to_key) or raise JWK::Set::KidNotFound else key end end |