Skip to content

evans-kim/jwt-guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.

About

JWT Guard (Laravel 5.4 Auth Guard custom driver for tymon/jwt-auth

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages