Skip to content

Commit

Permalink
Merge pull request #97 from M66B/master
Browse files Browse the repository at this point in the history
Fixed token validation
  • Loading branch information
glena authored Aug 5, 2016
2 parents 8ef2b94 + 7f10500 commit 2cfffd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Auth0JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function decode($jwt, $valid_audiences, $client_secret, array $aut
$body64 = $tks[1];
$head = json_decode(JWT::urlsafeB64Decode($headb64));

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

}

}
}

0 comments on commit 2cfffd7

Please sign in to comment.