Skip to content

Commit

Permalink
Add Passport config
Browse files Browse the repository at this point in the history
  • Loading branch information
reinink committed Apr 4, 2018
1 parent 575da30 commit 01c1be3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config/passport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Encryption Keys
|--------------------------------------------------------------------------
|
| Passport uses encryption keys when generating secure access tokens.
| By default these keys are stored as local files, but can also be
| set using the following environment variables.
|
*/

'private_key' => env('PASSPORT_PRIVATE_KEY'),

'public_key' => env('PASSPORT_PUBLIC_KEY'),

];
16 changes: 16 additions & 0 deletions src/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public function register()
$this->registerResourceServer();

$this->registerGuard();

$this->offerPublishing();
}

/**
Expand Down Expand Up @@ -281,4 +283,18 @@ protected function deleteCookieOnLogout()
}
});
}

/**
* Setup the resource publishing groups for Passport.
*
* @return void
*/
protected function offerPublishing()
{
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/passport.php' => config_path('passport.php'),
], 'passport-config');
}
}
}

0 comments on commit 01c1be3

Please sign in to comment.