kadevjo/fibonacci

There is no license information available for the latest version (v1.04) of this package.

Extension Voyager Library

Installs: 399

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 0

Forks: 1

pkg:composer/kadevjo/fibonacci


README

Vendor fibonacci

To use the middlewares you will have to register them in app/Http/Kernel.php under the $routeMiddleware property:

protected $routeMiddleware = [ ... 'jwt.auth' => 'Tymon\JWTAuth\Middleware\GetUserFromToken', 'jwt.refresh' => 'Tymon\JWTAuth\Middleware\RefreshToken', ];

Add the following code to the render method within app/Exceptions/Handler.php

if ($exception instanceof Tymon\JWTAuth\Exceptions\TokenExpiredException) { return response()->json(['error'=>'token_expired'], $exception->getStatusCode()); } else if ($exception instanceof Tymon\JWTAuth\Exceptions\TokenInvalidException) { return response()->json(['token_invalid'], $exception->getStatusCode()); } else if($exception instanceof \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException ){ return response()->json(['error'=>'token_not_found'], $exception->getStatusCode()); } }