Skip to content

Commit

Permalink
default throw still
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Jul 19, 2024
1 parent 231a2d9 commit 3325fd7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ private function sign(Secret $key): string
Algorithm::HmacSha256 => hash_hmac('SHA256', $payload, $key->reveal(), true),
Algorithm::HmacSha384 => hash_hmac('SHA384', $payload, $key->reveal(), true),
Algorithm::HmacSha512 => hash_hmac('SHA512', $payload, $key->reveal(), true),
default => throw new Exception('Unsupported algorithm'),
};
// use openssl_sign and friends to do the signing
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
Expand Down

0 comments on commit 3325fd7

Please sign in to comment.