Hi everyone,
i m used Slim3 Framework Authorization with JWT
I am having an issue after running and getting a login token trying to access /api/
I get this error:
Slim Application Error
The application could not run because of the following error:
Details
Type: Slim\Exception\ContainerValueNotFoundException
Message: Identifier "jwt" is not defined.
File: /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/Container.php
Line: 120
Trace
#0 /Users/hanifeoglu/Sites/slim-framework3-jwt/src/routes.php(40): Slim\Container->get('jwt')
#1 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#2 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#3 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/Route.php(335): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#4 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#5 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/Route.php(313): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#6 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/App.php(495): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#7 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/tuupola/callable-handler/src/CallableHandler.php(34): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#8 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/tuupola/slim-jwt-auth/src/JwtAuthentication.php(150): Tuupola\Middleware\CallableHandler->handle(Object(Slim\Http\Request))
#9 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/tuupola/callable-handler/src/DoublePassTrait.php(30): Tuupola\Middleware\JwtAuthentication->process(Object(Slim\Http\Request), Object(Tuupola\Middleware\CallableHandler))
#10 [internal function]: Tuupola\Middleware\JwtAuthentication->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#11 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Tuupola\Middleware\JwtAuthentication), Array)
#12 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#13 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#14 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/App.php(388): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /Users/hanifeoglu/Sites/slim-framework3-jwt/vendor/slim/slim/Slim/App.php(296): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /Users/hanifeoglu/Sites/slim-framework3-jwt/public/index.php(30): Slim\App->run()
#18 {main}