Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

Commit

Permalink
Add passport authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
suphon-t committed Jul 24, 2018
1 parent 7702d05 commit f1402be
Show file tree
Hide file tree
Showing 5 changed files with 824 additions and 14 deletions.
3 changes: 2 additions & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;

class AuthServiceProvider extends ServiceProvider
{
Expand All @@ -25,6 +26,6 @@ public function boot()
{
$this->registerPolicies();

//
Passport::routes();
}
}
3 changes: 2 additions & 1 deletion app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Passport\HasApiTokens;

class User extends Authenticatable
{
use Notifiable;
use Notifiable, HasApiTokens;

/**
* The attributes that are mass assignable.
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.6.*",
"laravel/tinker": "^1.0"
"laravel/passport": "^6.0",
"laravel/tinker": "^1.0",
"paragonie/random_compat": "2.*"
},
"require-dev": {
"filp/whoops": "^2.0",
Expand Down
Loading

0 comments on commit f1402be

Please sign in to comment.