Skip to content

Commit 60d5b99

Browse files
committed
guess 不刷新token
1 parent 8cdc77a commit 60d5b99

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Api/Middleware/TokenGuess.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ public function handle($request, Closure $next)
1818
$this->checkForToken($request);
1919
$this->auth->parseToken()->authenticate();
2020
} catch (TokenExpiredException $exception) {
21-
$token = $this->auth->refresh();
22-
Auth::guard(Api::GUARD)->onceUsingId(
23-
$this->auth
24-
->manager()
25-
->getPayloadFactory()
26-
->buildClaimsCollection()
27-
->toPlainArray()['sub']
28-
);
29-
30-
return $this->setAuthenticationHeader($next($request), $token);
31-
} catch (Exception $exception) {
21+
// $token = $this->auth->refresh();
22+
// Auth::guard(Api::GUARD)->onceUsingId(
23+
// $this->auth
24+
// ->manager()
25+
// ->getPayloadFactory()
26+
// ->buildClaimsCollection()
27+
// ->toPlainArray()['sub']
28+
// );
29+
//
30+
// return $this->setAuthenticationHeader($next($request), $token);
31+
// } catch (Exception $exception) {
3232
return $next($request);
3333
}
3434

0 commit comments

Comments
 (0)