anyone knows which version works well with Lumen 5.2 ?
when i tried to use the JWTAuth facade, an exception was logged as below
[2016-03-08 07:09:01] lumen.ERROR: exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\Cache\CacheManager' in /home/vagrant/projects/lumen-master/vendor/illuminate/container/Container.php:839
...
and my composer.json
"require": {
"php": ">=5.5.9",
"laravel/lumen-framework": "5.2.*",
"vlucas/phpdotenv": "~2.2",
"dingo/api": "1.0.x@dev",
"tymon/jwt-auth": "^0.5.9"
},
Got the same problem. And i'm not that skilled to solve this xD. Have been searching for a while no succes :(
in your config/jwt.php replace existing code with
'auth' => function ($app) {
return new Tymon\JWTAuth\Providers\Auth\IlluminateAuthAdapter($app['auth']);
},
'storage' => function ($app) {
return new Tymon\JWTAuth\Providers\Storage\IlluminateCacheAdapter($app['cache']);
}
@patrickdronk my jwt.php is the same as you posted. any other suggests, thanks
You're going to have a hard time getting it to work with 0.5. Try the new 1.0.0-alpha1 tag. @mtpultz made a great guide on setting it up Lumen with that branch in https://github.com/tymondesigns/jwt-auth/issues/513#issuecomment-186087297.
@abcsun Here is a gist I made with the changes I needed to make to get JWT working on a fresh lumen project. You should be able to download the ZIP and just paste the files into the project directory.
Thanks for your gist @jonsa , it works well.
@tdhsmith thanks for you link to #513
@jonsa - please update your composer.json in your gist from "tymon/jwt-auth": "0.6.*@dev" to "tymon/jwt-auth": "1.0.*@dev" since the 0.6.*@dev is no longer available. #685
i have this same problem on laravel, any solution?
Most helpful comment
in your config/jwt.php replace existing code with