Jwt-auth: Class App\Http\Tymon\JWTAuth\MiddlewareGetUserFromToken does not exist

Created on 30 Dec 2016  路  4Comments  路  Source: tymondesigns/jwt-auth

laravel 5.3
app.config
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class

'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class, 'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class

composer.json

 "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.3.*",
        "tymon/jwt-auth": "0.5.*"
    },

Most helpful comment

The documentation doesn't include the preceding slash on the middleware declarations:

'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,

Had the same problem in Laravel 5.3 until I added that backslash

All 4 comments

The documentation doesn't include the preceding slash on the middleware declarations:

'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,

Had the same problem in Laravel 5.3 until I added that backslash

@Migweld Thanks. That fixed my problem. You should submit PR to Wiki.

Also, anything to read it about that. My skills are limited using classes in PHP.

@Migweld , i seem to be missing something really silly here. Where is the middleware declaration?
I don't see any such thing on the wiki - https://github.com/tymondesigns/jwt-auth/wiki/Installation

@prateekvarma It should be under app/Http/Kernel.php, although I must admit I've switched over to Dingo in my project and can't seem to find the commit wherin I was using JWT to confirm :grimacing:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gamelife1314 picture gamelife1314  路  3Comments

shah-newaz picture shah-newaz  路  3Comments

harveyslash picture harveyslash  路  3Comments

hfalucas picture hfalucas  路  3Comments

phamduong picture phamduong  路  3Comments