From 39b32b662295865faff9ddc0742567f6bfcd8e2c Mon Sep 17 00:00:00 2001 From: Nemo Date: Thu, 21 Apr 2022 13:09:12 +0530 Subject: [PATCH] Print the JWT --- run.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/run.php b/run.php index b809491..319ec03 100755 --- a/run.php +++ b/run.php @@ -1,7 +1,7 @@ #!/usr/bin/env php $_ENV['FORTELLER_EMAIL'], + "email" => getenv('FORTELLER_EMAIL'), "returnSecureToken" => true, - "password"=> $_ENV['FORTELLER_PASSWORD'] + "password"=> getenv('FORTELLER_PASSWORD') ]) ); @@ -80,6 +80,7 @@ function login() { function request($url, $accept = 'application/json') { global $jwt; + echo "Fetching $url\n"; return doCurl( $url, @@ -112,6 +113,10 @@ if (isset($argv[2])) { } $jwt = login(); +// Print the JWT token without the Signature +print_r(array_map(function($x) { + return base64_decode($x); +}, array_slice(explode('.', $jwt), 0, 2))); $sku = $argv[1]; $game = null;