关于 http://code.google.com/apis/accounts/docs/OAuth2.html Google 区分两种 token :刷新 token 和访问 token 。刷新 token 是否与更传统的请求 token 相同?在 http://oauth.net/core/1.0/我找不到任何地方提到的刷新 token 。或者,它是 OAuth2.0 的新功能吗?
最佳答案
访问 token 会在短时间(我猜是 3600 秒)后过期。
如果您想在用户离线后访问他的帐户,您需要一个刷新 token 。 旧访问 token 过期后,您可以交换刷新 token 以获取新的访问 token 。
来自您提供的链接
Access tokens have a limited lifetime and, in some cases, an application needs access to a Google API beyond the lifetime of a single access token. When this is the case, your application can obtain what is called a refresh token. A refresh token allows your application to obtain new access tokens.
即仅当您需要离线访问时才需要刷新 token ,否则您不需要全部。它是可选的。
查看此链接,它将提供有关刷新 token 的所有内容。
http://code.google.com/apis/accounts/docs/OAuth2WebServer.html
关于authentication - 刷新 token 是否与请求 token 相同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8961792/