There was an error while loading. Please reload this page.
1 parent d4850ea commit 39f5deeCopy full SHA for 39f5dee
public/login.php
@@ -47,9 +47,12 @@
47
* Create the token as an array
48
*/
49
$data = [
50
- 'id' => $rs['id'], //userid from the users table
51
- 'iat' => time(), //Issued at: time when the token was generated
52
- 'jti' => uniqid(), //Json Token Id: an unique identifier for the token
+ 'id' => $rs['id'], //userid from the users table
+ 'iat' => time(), //Issued at: time when the token was generated
+ 'jti' => uniqid(), //Json Token Id: an unique identifier for the token
53
+ 'iss' => $_SERVER['SERVER_NAME'], //Issuer
54
+ 'nbf' => time(), //Not before
55
+ 'exp' => time() + 3600, //Expire
56
];
57
58
/*
0 commit comments