Add laravel passport

This commit is contained in:
Daniel Supernault 2018-12-30 21:30:57 -07:00
parent 547ac5c8f9
commit ac27365a63
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 7 additions and 2 deletions

View file

@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;
class AuthServiceProvider extends ServiceProvider
{
@ -24,6 +25,10 @@ class AuthServiceProvider extends ServiceProvider
{
$this->registerPolicies();
//
Passport::routes();
Passport::tokensExpireIn(now()->addDays(15));
Passport::refreshTokensExpireIn(now()->addDays(30));
}
}

View file

@ -42,7 +42,7 @@ return [
],
'api' => [
'driver' => 'token',
'driver' => 'passport',
'provider' => 'users',
],
],