Skip to content

choccybiccy/twitch-tokens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitch-tokens Build Status

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: