Skip to content

Commit

Permalink
use config for jwtauth fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuck committed Jun 30, 2017
1 parent 864f486 commit 79cd5c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function idpAuthenticate()

$route = config('shibboleth.authenticated');

if (env('JWTAUTH') === true) {
if (config('jwtauth') === true) {
$route .= $this->tokenizeRedirect($user, ['auth_type' => 'idp']);
}

Expand All @@ -135,7 +135,7 @@ public function destroy()
Auth::logout();
Session::flush();

if (env('JWTAUTH')) {
if (config('jwtauth')) {
$token = JWTAuth::parseToken();
$token->invalidate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function boot()
*/
public function register()
{
if (env('JWTAUTH')) {
if (config('jwtauth')) {
$this->app->register('Tymon\JWTAuth\Providers\JWTAuthServiceProvider');
$loader = AliasLoader::getInstance();
$loader->alias('JWTAuth', 'Tymon\JWTAuth\Facades\JWTAuth');
Expand Down
13 changes: 13 additions & 0 deletions src/config/shibboleth.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,17 @@

'add_new_users' => true, // Should new users be added automatically if they do not exist?
/*
|--------------------------------------------------------------------------
| JWT Auth
|--------------------------------------------------------------------------
|
| JWTs are for the front end to know it's logged in
|
| https://github.com/tymondesigns/jwt-auth
| https://github.com/StudentAffairsUWM/Laravel-Shibboleth-Service-Provider/issues/24
|
*/

'jwtauth' => env('JWTAUTH', false),
);

0 comments on commit 79cd5c7

Please sign in to comment.