[英]google-oauth-java-client - Force access token default lifetime
I'm wondering if it's possible to change the default lifetime (3600) ? 我想知道是否可以更改默认生存期(3600)?
In fact, i'm trying to solve an issue and i want to check if the issue is due to an expired access token.. 实际上,我正在尝试解决问题,并且我想检查问题是否是由于访问令牌过期引起的。
Else, is it possible to force the access token used by a credential ? 否则,是否可以强制凭证使用访问令牌?
Let me know if it's not clear. 让我知道是否不清楚。 Regards, 问候,
Sebastien 塞巴斯蒂安
You cannot change the lifetime of an access token. 您无法更改访问令牌的生存期。 You could, however, get a refresh token that can be used to get fresh access tokens (see Google OAuth2 docs ). 但是,您可以获得一个刷新令牌,该令牌可用于获取最新的访问令牌(请参阅Google OAuth2 docs )。
Hope that helps. 希望能有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.