Skip to content

Commit 2cfffd7

Browse files
authored
Merge pull request #97 from M66B/master
Fixed token validation
2 parents 8ef2b94 + 7f10500 commit 2cfffd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Auth0JWT.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function decode($jwt, $valid_audiences, $client_secret, array $aut
4141
$body64 = $tks[1];
4242
$head = json_decode(JWT::urlsafeB64Decode($headb64));
4343

44-
if ( !($head instanceof stdClass) || ! isset($head->alg))
44+
if ( !is_object($head) || ! isset($head->alg))
4545
{
4646
throw new InvalidTokenException("Invalid token");
4747
}
@@ -116,4 +116,4 @@ public static function encode($audience, $client_secret, $scopes = null, $custom
116116

117117
}
118118

119-
}
119+
}

0 commit comments

Comments
 (0)