Open mr-Sepi0l opened 4 years ago
Hello ! Maybe you already founded the solution but if not try this:
the path for the classes changed, worked for me use the news paths on $routeMiddleware:
'jwt.auth' => \Tymon\JWTAuth\Http\Middleware\Authenticate::class, 'jwt.refresh' => \Tymon\JWTAuth\Http\Middleware\RefreshToken::class,
It really helps for latest versions. Thanks @yasming
Class Tymon\JWTAuth\Middleware\GetUserFromToken does not exists
I'm trying to run tests in laravel with JWT-AUTH. I've been able to run test for the login, logout and refresh and everything works as intended. But as soon as I wanna use an endpoint behind
jwt-auth
middleware I got this error. I've tried several solution I've found on stack overflow but none of them fixes the issue. As far as I know, no matter how I setup my call in my test, I always got this error.I already tried to
composer dump-autoload
and it doesn't fix the issue.Your environment
Steps to reproduce
Just make a call behind
jwt-auth
middlewareapi.php
my test