登錄授權整理(OAuth)

The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849.

一、基本腦圖

在這裏插入圖片描述

二、四種方式流程圖

1. 授權碼

在這裏插入圖片描述

2. 隱藏式

在這裏插入圖片描述

3. 密碼式

在這裏插入圖片描述

4. 客戶端憑證在這裏插入圖片描述

三、令牌更新

驗證通過後會返回兩個令牌

1、獲取數據的令牌
2、獲取新令牌的令牌(refresh_token)

使用refresh_token獲取新的令牌。

參考資料

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章