Skip to content

Commit

Permalink
Make token issuer configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Nov 21, 2017
1 parent f69f112 commit f581ed8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/config.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
*/
define('TOKEN_SUBJECT', 'SchunterKinoRemote');

/**
* The issuer of the token.
*/
define('TOKEN_ISSUER', 'http://schunterkino.de');

/**
* The algorithm used to sign the JWT.
* https://tools.ietf.org/html/rfc7518
Expand Down
2 changes: 1 addition & 1 deletion public/token.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use \Firebase\JWT\JWT;

$token_base = ['iss' => 'http://schunterkino.de',
$token_base = ['iss' => TOKEN_ISSUER,
'iat' => time(),
'nbf' => time(),
// Expire in x hours.
Expand Down

0 comments on commit f581ed8

Please sign in to comment.