Skip to content

Commit

Permalink
fix:使用JWTAuthDefaultSceneMiddleware中间件时,no_check_route不生效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuzhao authored and liyuzhao committed Feb 17, 2022
1 parent 8ddd95a commit 51642db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Middleware/JWTAuthDefaultSceneMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(HttpResponse $response, JWT $jwt, PathMatch $pathMat
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// 判断是否为noCheckRoute
$path = $request->getUri();
$path = $request->getUri()->getPath();
$method = $request->getMethod();
if ($this->jwt->matchRoute('default', $method, $path)) {
return $handler->handle($request);
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/JWTAuthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(HttpResponse $response, JWT $jwt)
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// 判断是否为noCheckRoute
$path = $request->getUri();
$path = $request->getUri()->getPath();
$method = $request->getMethod();
if ($this->jwt->matchRoute(null, $method, $path)) {
return $handler->handle($request);
Expand Down

0 comments on commit 51642db

Please sign in to comment.