Skip to content

Commit

Permalink
unify coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
nov committed Jan 2, 2024
1 parent 0d5a266 commit 6391631
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/json/jws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def valid?(public_key_or_secret)
public_key_or_secret = with_jwk_support public_key_or_secret
case
when hmac?
secure_compare sign(signature_base_string, public_key_or_secret), signature
secret = public_key_or_secret
secure_compare sign(signature_base_string, secret), signature
when rsa?
public_key = public_key_or_secret
public_key.verify digest, signature, signature_base_string
Expand Down

0 comments on commit 6391631

Please sign in to comment.