Skip to content

Commit

Permalink
Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
roufy235 committed Jan 2, 2021
1 parent 9124791 commit 160b8d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions router/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@
$renderer = new PhpRenderer(__DIR__ . '/../views/');

$userId = [
'username' => 'ade',
'surname' => 'bello'
'username' => 'ertyuiop',
'surname' => 'hfhfhfhfhfh'
];
$secret = 'sec!ReT423*&';
$expiration = time() + 3600;
$issuer = 'localhost';

$token = Token::create($userId, $secret, $expiration, $issuer);


$result = Token::validate($token, $secret);
$payload = Token::getPayload($token, $secret);
$header = Token::getHeader($token, $secret);
Expand Down
4 changes: 2 additions & 2 deletions views/name.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<h1>
hello <?php echo $name; ?>
</h1>
<h2>
<pre>
<?php
echo $token;
?>
</h2>
</pre>
<h2>
<?php
echo $result;
Expand Down

0 comments on commit 160b8d1

Please sign in to comment.