更新时间:2022-12-06 22:46:48
我不知道为什么,但问题出在 curl
.
I don't know why, but the problem was with curl
.
我将其替换为 WWW::Mechanize
:
I replaced it by WWW::Mechanize
:
my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->post('https://accounts.google.com/o/oauth2/token',
'Content-Type' => 'application/x-www-form-urlencoded',
'Content' => [
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
'assertion' => $token_request,
],
);
它有效.