Last active
September 10, 2015 23:31
-
-
Save ActuallyACat/a77143107e824bc786f2 to your computer and use it in GitHub Desktop.
Temporary fix for tymon/jwt-auth ~0.6 to work in Lumen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Auth\AuthManager; | |
| use Illuminate\Cache\CacheManager; | |
| use Tymon\JWTAuth\Providers\LumenServiceProvider; | |
| class JWTAuthServiceProvider extends LumenServiceProvider | |
| { | |
| /** | |
| * Register the bindings for the Auth provider | |
| */ | |
| protected function registerAuthProvider() | |
| { | |
| $this->app->singleton( | |
| 'tymon.jwt.provider.auth', | |
| function ($app) { | |
| $provider = $this->config('providers.auth'); | |
| return $app->make($provider, [new AuthManager($app)]); | |
| } | |
| ); | |
| } | |
| /** | |
| * Register the bindings for the Storage provider | |
| */ | |
| protected function registerStorageProvider() | |
| { | |
| $this->app->singleton( | |
| 'tymon.jwt.provider.storage', | |
| function ($app) { | |
| $provider = $this->config('providers.storage'); | |
| return $app->make($provider, [new CacheManager($app)]); | |
| } | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great fix! 👍