from google.oauth2 import service_account
credentials = service_account.Credentials.from_service_account_file(
'service-account.json')
print(credentials.__dict__)
该打印语句打印凭据,但该令牌中的凭据不打印,过期也打印为无。 JSON文件
{
"type": "service_account"
"project_id": xxxxxxxxxx
"private_key_id": xxxxxxxxxx
"private_key": xxxxxxxxxx
"client_email": xxxxxxxxxx
"client_id": xxxxxxxxxx
"auth_uri": xxxxxxxxxx
"token_uri": xxxxxxxxxx
"auth_provider_x509_cert_url": xxxxxxxxxx
"client_x509_cert_url": xxxxxxxxxx
}
请帮助我如何为到期时间的服务帐户生成令牌。