为什么OAuth v2同时具有访问权限和刷新令牌?

馋奶兔 提交于 2020-08-06 20:34:48

问题:

Section 4.2 of the draft OAuth 2.0 protocol indicates that an authorization server can return both an access_token (which is used to authenticate oneself with a resource) as well as a refresh_token , which is used purely to create a new access_token : OAuth 2.0协议草案的4.2节指出授权服务器可以返回access_token (用于向资源验证自己)以及refresh_token ,它仅用于创建新的access_token

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

Why have both? 为什么两者都有? Why not just make the access_token last as long as the refresh_token and not have a refresh_token ? 为什么不将access_token设为refresh_token并且没有refresh_token


解决方案:

参考一: https://stackoom.com/question/EdNv/为什么OAuth-v-同时具有访问权限和刷新令牌
参考二: https://oldbug.net/q/EdNv/Why-Does-OAuth-v2-Have-Both-Access-and-Refresh-Tokens
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!