Skip to content

Commit

Permalink
fixed a bug where getting token always return null
Browse files Browse the repository at this point in the history
  • Loading branch information
ericyzhu committed Jan 28, 2021
1 parent 5854c85 commit 1aeecf2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Jwt.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ class Jwt
*/
protected $request;

/**
* The token.
*
* @var null|\HyperfExt\Jwt\Token
*/
protected $token;

/**
* Lock the subject.
*
Expand Down Expand Up @@ -166,6 +159,7 @@ public function getToken(): ?Token
if (empty($token = Context::get(Token::class))) {
try {
$this->parseToken();
$token = Context::get(Token::class);
} catch (JwtException $e) {
$token = null;
}
Expand Down

0 comments on commit 1aeecf2

Please sign in to comment.