Skip to content

Commit

Permalink
Does this make code climate happy?
Browse files Browse the repository at this point in the history
  • Loading branch information
martinemde authored and excpt committed Sep 1, 2020
1 parent 462c653 commit ba2244f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/jwt/jwk/key_finder.rb
Expand Up @@ -14,10 +14,8 @@ def key_for(kid)

jwk = resolve_key(kid)

unless jwk
raise ::JWT::DecodeError, 'No keys found in jwks' if jwks_keys.empty?
raise ::JWT::DecodeError, "Could not find public key for kid #{kid}"
end
raise ::JWT::DecodeError, 'No keys found in jwks' if jwks_keys.empty?
raise ::JWT::DecodeError, "Could not find public key for kid #{kid}" unless jwk

::JWT::JWK.import(jwk).keypair
end
Expand Down

0 comments on commit ba2244f

Please sign in to comment.