Skip to content

Commit

Permalink
fix required "alg" in test + correct method name casing
Browse files Browse the repository at this point in the history
  • Loading branch information
edudobay committed May 23, 2023
1 parent c55b88d commit a61a0b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public static function jsonEncode(array $input): string
*/
public static function urlsafeB64Decode(string $input): string
{
return \base64_decode(self::convertBase64urlToBase64($input));
return \base64_decode(self::convertBase64UrlToBase64($input));
}

/**
Expand All @@ -413,7 +413,7 @@ public static function urlsafeB64Decode(string $input): string
*
* @see https://www.rfc-editor.org/rfc/rfc4648
*/
public static function convertBase64urlToBase64(string $input): string
public static function convertBase64UrlToBase64(string $input): string
{
$remainder = \strlen($input) % 4;
if ($remainder) {
Expand Down
1 change: 1 addition & 0 deletions tests/data/ed25519-jwkset.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"keys": [
{
"kid": "jwk1",
"alg": "EdDSA",
"kty": "OKP",
"crv": "Ed25519",
"x": "uOSJMhbKSG4V5xUHS7B9YHmVg_1yVd-G-Io6oBFhSfY"
Expand Down

0 comments on commit a61a0b0

Please sign in to comment.