korodo / jwt-guard
JWT Guard for Laravel 5.4 below
0.2.2
2019-08-27 06:19 UTC
Requires
- php: >=5.6
- illuminate/auth: ^5.4
- illuminate/contracts: ^5.4
- illuminate/support: ^5.4
- tymon/jwt-auth: ^0.5
This package is auto-updated.
Last update: 2024-09-27 18:54:15 UTC
README
tymon/jwt-auth:0.5* 패키지에 라라벨 커스텀 AuthGuard 드라이버를 추가하는 포크 입니다. 라라벨 5.4 미만에서 'jwt' 드라이버를 설정하면 auth() 헬퍼 함수 등을 사용할 수 있습니다.
This is a fork of tymon/jwt-auth:0.5* package to support AuthGuard custom driver. Below Laravel 5.4, It help you using
auth('api')
helper ormiddleware('auth:api')
before use this please watch Laravel Document then check how to change auth driver.
Install
composer require tymon/jwt-auth korodo/jwt-guard:dev-master
Register Service Providers
config/app.php
'providers'=>[ ... App\Providers\RouteServiceProvider::class, \Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class, \Korodo\JWTGuard\JWTGuardServiceProvider::class, ... ]
config/auth.php
'guards' => [ ... 'api' => [ 'driver' => 'jwt', // it was token 'provider' => 'users', ], ... ],
php artisan jwt:generate
License
The MIT License (MIT). Please see License File for more information.