The test program below shows an I/O error for Pike 8.1, and it shows Result "{\n" " "error": "invalid_grant",\n" " "error_description": "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems."\n" "}" (which is correct) for Pike 8.0.
int main(int argc, array(string) argv) { Protocols.HTTP.Query q; q = Protocols.HTTP.do_method("POST", "https://www.googleapis.com/oauth2/v4/token", 0, ([ "user-agent":"Mozilla 4.0 (Pike OAuth2 Client 1.0)", "content-type":"application/x-www-form-urlencoded", ]), 0, "grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&" "assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NTgyMT" "A3ODIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9jb21" "wdXRlLnJlYWRvbmx5IiwianRpIjoiYzA3YjM5MDUtNjQ4MC00YjI0LTgyYWMtNzJi" "M2U5MzE3NDE4IiwiaWF0IjoxNTU4MjA3MTgyLCJhdWQiOiJodHRwczovL3d3dy5nb" "29nbGVhcGlzLmNvbS9vYXV0aDIvdjQvdG9rZW4iLCJpc3MiOiJjdWNpYm90QGFuZ2" "VsaWMtaG93bC0yMzYxMjMuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20ifQ.HgT4S-sa" "Cz4hh-7mDdU8LnTLvs1wGCrCzydBiwC7XTFL2EtTsAg0U2HFXr_5kztVhqp6yvAW5" "4xQw5gGSsetSszmdpHEFDwmVmIHfUlvpXeXCLoOx3_Bgphuj4pqigg0Czg2suyl3X" "lpjSNtWC_spJHBtARk8zqXhpx1vnFNU-q1NAMvNRYzXI-aE1od8sOsbxPCFoHDKn-" "pBKs7nNTnNV24BQcYfOCq6Mxiy-ZgYkDZxmM6YbtGastSwcJlGvQt5M9x4BveX-i4" "AqBAMCxZ-d5P_Lc3PqZxSuTVCoxpRGzDGsC6oINEe5tnD08zVFQ1moi-F6aTkaV2W" "m7uODhDmw" ); werror("Result %O\n", q->data()); return 0; }