Google 访问令牌过期时间 [英] Google access token expiration time

查看:101
本文介绍了Google 访问令牌过期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 Google API 获取 access_token 时,它带有一个 expires_in 值.根据文档,此值表示访问令牌的剩余生命周期".

When I obtain an access_token from the Google API, it comes with an expires_in value. According to the documentation, this value indicates "The remaining lifetime of the access token".

这个值的单位是什么?

推荐答案

规范说秒:

http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-4.2.2

expires_in
    OPTIONAL.  The lifetime in seconds of the access token.  For
    example, the value "3600" denotes that the access token will
    expire in one hour from the time the response was generated.

我同意 OP 的观点,即 Google 不记录这一点是粗心的.

I agree with OP that it's careless for Google to not document this.

这篇关于Google 访问令牌过期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆