简体   繁体   English

Linkedin oauth访问令牌刷新不会增加到期时间

[英]Linkedin oauth access token refresh does not increase expiration time

I am using the following procedure to refresh linkedin oauth2 access tokens 我正在使用以下过程刷新linkedin oauth2访问令牌

https://developer.linkedin.com/docs/oauth2#refresh https://developer.linkedin.com/docs/oauth2#refresh

After initiating the oauth procedure in the browser, the dialog is skipped as described, and a new code is issued which I then use to obtain a new, different access_token. 在浏览器中启动oauth过程后,如所描​​述的那样跳过对话框,并发出新代码,然后我将其用于获取新的不同的access_token。 However the expires_in field ( seconds till expiration ) is lesser than the one in the previous access_token it is in fact referencing the same expiration date. 但是expires_in字段(到expiration为止的秒数)小于上一个access_token中的字段,它实际上是指相同的到期日期。

This means that the expiration date effectively has not been extended, Which is the purpose of refreshing the access token. 这意味着有效期尚未有效地延长,这是刷新访问令牌的目的。

Does refreshing an access token extend the expiration time ? 刷新访问令牌是否会延长有效期?
Or is there anything I am missing here ? 还是我在这里想念什么? ( perhaps the expiration date can only be extended after a certain time of usage ? ) (也许有效期只能在使用一定时间后才能延长?)

The expires_in will always be the same as the previous access_token because expires_in is just the number of expires that the token will be valid for. expires_in将始终与先前的access_token相同,因为expires_in只是令牌将对其有效的过期次数。 I don't know what LinkedIn return for this value, but I'm guessing you are seeing a nice round number each time? 我不知道LinkedIn会为该值返回什么,但是我想您每次都看到一个不错的整数。

https://tools.ietf.org/html/rfc6749#section-4.2.2 https://tools.ietf.org/html/rfc6749#section-4.2.2

expires_in 过期日期在

  RECOMMENDED. 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. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value. 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM