choccybiccy / twitch-tokens
A library to verify Twitch JWT tokens.
1.0.0
2019-08-23 10:27 UTC
Requires
- php: ^7.2
- ext-gmp: *
- ext-json: *
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.7
- php-http/httplug: ^2.0
- php-http/message-factory: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0
- psr/simple-cache: ^1.0
- web-token/jwt-core: ^2.0
- web-token/jwt-signature: ^2.0
- web-token/jwt-signature-algorithm-rsa: ^2.0
Requires (Dev)
- php-http/message: ^1.8
- phpspec/phpspec: ^5.1
- symfony/var-dumper: ^4.3
This package is auto-updated.
Last update: 2024-11-28 04:19:36 UTC
README
A library to verify Twitch JWT tokens.
Requirements
- PHP 7.2+
- ext-json
Installation
composer require choccybiccy/twitch-tokens
Usage
use Twitch\Auth\Token\Verifier;
$verifier = new Verifier;
if ($token = $verifier->verifyToken('token-string')) {
$id = $token->get('sub');
var_dump($token->toArray());
}
Contributing
Make your changes, and ensure that appropriate tests have been created and that the test suite passes.
./vendor/bin/phpspec
Thanks
Special mention for help and guidance provided by: