I'm trying to decode and verify Amazon Cognito JWT tokens, as described here:
https://github.com/awslabs/aws-support-tools/tree/master/Cognito/decode-verify-jwt
Their example uses python, which depends on a library called python-jose to do the heavy lifting.
I'm trying to do the same thing using Crypt::JWT. My code looks like this:
use strict;
use Crypt::JWT qw(decode_jwt);
my $keylist = '...';
my $token = '...';
my $data = decode_jwt(token=>$token, kid_keys=>$keylist);
I'm using $keylist and $token values that work in the python script.
But in the perl version I'm getting this error:
JWT: exp claim check failed
Is there anything like python-jose for perl?
Am I using Crypt::JWT incorrectly? Is there a better tool for the job?