PHP code example of arokettu / system-clock
1. Go to this page and download the library: Download arokettu/system-clock library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
arokettu / system-clock example snippets
$clock = new \Arokettu\Clock\SystemClock();
$clockPsrAwareValidator->isValid($clock);
use Arokettu\Clock\SystemClock;
use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Signer\Hmac\Sha256;
$cfg = Configuration::forSymmetricSigner(new Sha256(), '...');
$token = $cfg->parser()->parse('...');
$cfg->validator()->assert(
$token,
new StrictValidAt(new SystemClock())
);