Skip to content

Instantly share code, notes, and snippets.


Heri Sim heri16

View GitHub Profile
heri16 / cognito-decode-jwt-token.php
Last active Feb 9, 2019 — forked from jeffski/cognito-decode-jwt-token.php
Decode user identity from JWT Token
View cognito-decode-jwt-token.php
* Assumes library is installed: composer require spomky-labs/jose
* Check token claims guide:
use Jose\Checker\AudienceChecker;
use Jose\Factory\CheckerManagerFactory;
$claim_checker_list = [
// 'exp', // We should enable 'exp', but this example will fail as the token has already expired