vdomah / oc-jwtauth

JWTAuth plugin for October CMS wich provides token based authentication
MIT License
27 stars 21 forks source link

Middleware \Tymon\JWTAuth\Middleware\GetUserFromToken not working #14

Closed wilsonkwok closed 6 years ago

wilsonkwok commented 6 years ago

I use the following code on my own plugin:

Route::post('test', function (\Request $request) {
   return response()->json(('The test was successful'));
})->middleware('\Tymon\JWTAuth\Middleware\GetUserFromToken');

But when I post something to this route, it always return the status 503 Service Unavailable, and I tested \Tymon\JWTAuth\Middleware\GetUserFromToken::handle() that is never called

but when I change Route::post to Route::get, \Tymon\JWTAuth\Middleware\GetUserFromToken::handle() will call successful.

Any idea for this situation? Thanks