项目作者: evans-kim

项目描述 :
JWT Guard (Laravel 5.4 Auth Guard custom driver for tymon/jwt-auth
高级语言: PHP
项目地址: git://github.com/evans-kim/jwt-guard.git
创建时间: 2018-11-29T03:55:16Z
项目社区:https://github.com/evans-kim/jwt-guard

开源协议:MIT License

下载


JWT Guard

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 or middleware('auth:api')
before use this please watch Laravel Document then check how to change auth driver.

Install

```shell script
composer require tymon/jwt-auth korodo/jwt-guard:dev-master

  1. ### Register Service Providers
  2. config/app.php
  3. ```php
  4. 'providers'=>[
  5. ...
  6. App\Providers\RouteServiceProvider::class,
  7. \Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
  8. \Korodo\JWTGuard\JWTGuardServiceProvider::class,
  9. ...
  10. ]

config/auth.php

  1. 'guards' => [
  2. ...
  3. 'api' => [
  4. 'driver' => 'jwt', // it was token
  5. 'provider' => 'users',
  6. ],
  7. ...
  8. ],

shell script php artisan jwt:generate

License

The MIT License (MIT). Please see License File for more information.