A library to verify Twitch JWT tokens.
- PHP 7.2+
- ext-json
composer require choccybiccy/twitch-tokens
use Twitch\Auth\Token\Verifier;
$verifier = new Verifier;
if ($token = $verifier->verifyToken('token-string')) {
$id = $token->get('sub');
var_dump($token->toArray());
}
Make your changes, and ensure that appropriate tests have been created and that the test suite passes.
./vendor/bin/phpspec
Special mention for help and guidance provided by: