Skip to content

Commit 301e6bc

Browse files
author
drtriumph
committed
Porting @brylie's change with a small modification
1 parent 2d5caeb commit 301e6bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Authentication/JWT.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public static function decode($jwt, $key = null, $verify = true)
4444
}
4545
list($headb64, $bodyb64, $cryptob64) = $tks;
4646
if (null === ($header = JWT::jsonDecode(JWT::urlsafeB64Decode($headb64)))) {
47-
throw new UnexpectedValueException('Invalid segment encoding');
47+
throw new UnexpectedValueException('Invalid header encoding');
4848
}
4949
if (null === $payload = JWT::jsonDecode(JWT::urlsafeB64Decode($bodyb64))) {
50-
throw new UnexpectedValueException('Invalid segment encoding');
50+
throw new UnexpectedValueException('Invalid claims encoding');
5151
}
5252
$sig = JWT::urlsafeB64Decode($cryptob64);
5353
if ($verify) {

0 commit comments

Comments
 (0)