Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
Formatting fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed May 8, 2018
1 parent 850a2c1 commit 96fcb81
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions conf/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
'max_username_length' => 128,
/*
* JWT Secret
* The secret used to encrypt/decrypt the JWT. Should be a 256 bit string.
* The secret used to sign the JWT. Should be a 256 bit string.
*/
'jwt_secret' => null,
/*
Expand All @@ -201,15 +201,14 @@
}

$signer = new Sha256();
$token = (new Builder())->setIssuedAt(time())
->setNotBefore(time())
->setExpiration(
time() + \Tilmeld\Tilmeld::$config['jwt_expire']
)
->set('guid', $user->guid)
->set('xsrfToken', uniqid('TILMELDXSRF-', true))
->sign($signer, $secret)
->getToken();
$token = (new Builder())
->setIssuedAt(time())
->setNotBefore(time())
->setExpiration(time() + \Tilmeld\Tilmeld::$config['jwt_expire'])
->set('guid', $user->guid)
->set('xsrfToken', uniqid('TILMELDXSRF-', true))
->sign($signer, $secret)
->getToken();
return $token;
},
/*
Expand Down

0 comments on commit 96fcb81

Please sign in to comment.