File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 3636 "ext-swoole" : " >=4.5" ,
3737 "ext-json" : " *" ,
3838 "ext-openssl" : " *" ,
39- "hyperf/cache" : " ^2 .0" ,
40- "hyperf/command" : " ^2 .0" ,
41- "hyperf/config" : " ^2 .0" ,
42- "hyperf/di" : " ^2 .0" ,
43- "hyperf/framework" : " ^2 .0" ,
39+ "hyperf/cache" : " ~2.0 .0" ,
40+ "hyperf/command" : " ~2.0 .0" ,
41+ "hyperf/config" : " ~2.0 .0" ,
42+ "hyperf/di" : " ~2.0 .0" ,
43+ "hyperf/framework" : " ~2.0 .0" ,
4444 "lcobucci/jwt" : " ~3.3.0" ,
4545 "nesbot/carbon" : " ^2.0"
4646 },
4747 "require-dev" : {
4848 "friendsofphp/php-cs-fixer" : " ^2.14" ,
49- "hyperf/testing" : " ^2 .0" ,
49+ "hyperf/testing" : " ~2.0 .0" ,
5050 "phpstan/phpstan" : " ^0.12" ,
5151 "swoole/ide-helper" : " dev-master" ,
5252 "mockery/mockery" : " ^1.0"
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function refresh(bool $forceForever = false): string
106106 return $ this ->token = $ this ->manager
107107 ->refresh ($ this ->token , $ forceForever , array_merge (
108108 $ this ->getCustomClaims (),
109- ($ prv = $ this ->getPayload ()->get ('prv ' )) ? ['prv ' => $ prv ] : []
109+ ($ prv = $ this ->getPayload (true )->get ('prv ' )) ? ['prv ' => $ prv ] : []
110110 ))
111111 ->get ();
112112 }
@@ -172,7 +172,7 @@ public function getToken(): ?Token
172172 /**
173173 * Parse the token from the request.
174174 *
175- *@throws \HyperfExt\Jwt\Exceptions\JwtException
175+ * @throws \HyperfExt\Jwt\Exceptions\JwtException
176176 * @return $this
177177 */
178178 public function parseToken ()
@@ -188,11 +188,11 @@ public function parseToken()
188188 * Get the raw Payload instance.
189189 * @throws \HyperfExt\Jwt\Exceptions\JwtException
190190 */
191- public function getPayload (): Payload
191+ public function getPayload (bool $ ignoreExpired = false ): Payload
192192 {
193193 $ this ->requireToken ();
194194
195- return $ this ->manager ->decode ($ this ->token );
195+ return $ this ->manager ->decode ($ this ->token , true , $ ignoreExpired );
196196 }
197197
198198 /**
You can’t perform that action at this time.
0 commit comments