samedi 30 mars 2019

How to guard API route using JWT laravel?

How to disable execute API requests if there is no token JWT?

No I have simple route:

Route::post('visitors/check', 'VisitorController@check');

And this code in controller VisitorController:

echo  JWTAuth::user()->id;

It fails down cause there is no token. How to handle this using JWT?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2I26goM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire