简体   繁体   English

google-oauth-java-client-强制访问令牌默认生存期

[英]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.

相关问题 如何使用 google-oauth-java-client? - How to use google-oauth-java-client? google-oauth-java-client 因抽搐而失败 - google-oauth-java-client fails with twitch 用于获取访问令牌的Google oauth java客户端失败,并显示“400 Bad Request {”error“:”invalid_request“}” - Google oauth java client to get an access token fails with “400 Bad Request { ”error“ : ”invalid_request“ }” 用于获取访问令牌的Google oauth java客户端失败,并显示“400 Bad Request {”error“:”invalid_request“}” - Google oauth java client to get an access token fails with “400 Bad Request { ”error“ : ”invalid_request“ }” Google OAuth Java的访问令牌和ID令牌的交换代码 - Exchange code for access token and id token for google oauth java oAuth 令牌与 Java Apache http 客户端 - oAuth Token with Java Apache http Client 无法使用Google API [google-oauth-java-client-1.12.0-beta]获取服务帐户流的令牌 - Unable to get token using Google APIs [google-oauth-java-client-1.12.0-beta] for service account flow 使用SkyDrive REST API从Java Desktop Client检索OAuth 2.0(隐式授权)的访问令牌。 - Retrieving access token of OAuth 2.0 (implicit grant) from java Desktop Client using SkyDrive REST API. 如何使用gcloud或Google Cloud Java SDK生成oauth令牌,客户端ID和密码 - How to generate oauth token, client id and secret using gcloud or Google Cloud Java SDK java.lang.RuntimeException:com.google.gdata.client.authn.oauth.OAuthException:oauth_token_secret不存在 - java.lang.RuntimeException: com.google.gdata.client.authn.oauth.OAuthException: oauth_token_secret does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM