1. Go to this page and download the library: Download ignislabs/hotjot 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/ */
ignislabs / hotjot example snippets
$token = $factory->create($claims, $headers);
$signer->verify($token);
$validator->validate($token);
$signer = new \IgnisLabs\HotJot\Signer\HMAC\HS512('encryption key');
$parser = new \IgnisLabs\HotJot\Parser;
$token = $parser->parse($encodedTokenString);
$signer = new \IgnisLabs\HotJot\Signer\RSA\RS512($privateKey, $publicKey, 'passphrase');
$signer->verify($token); // -> boolean — $token most likely obtained through the parser
use IgnisLabs\HotJot\Validators as 🕵;
$validator = new \IgnisLabs\HotJot\Validator(
new 🕵\IssuedAtValidator, // fails if token used before `iat`
new 🕵\NotBeforeValidator, // fails if token used before `nbf`
new 🕵\ExpiresAtValidator // fails if token is used after `exp`
);
$validator->validate($token);
use IgnisLabs\HotJot\Validators as 🕵;
$validator = new \IgnisLabs\HotJot\Validator(
new 🕵\IssuedAtValidator(true),
new 🕵\NotBeforeValidator(true),
new 🕵\ExpiresAtValidator(true)
);
$validator->validate($token);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.