支持的授權模式
password,client_credentials,authorization_code,refresh_token,implicit
一 授權碼模式
- 先提交相信的信息去獲取一個一次性code
--------------------------成功跳轉------------------------
- 拿到第一步的code之後,再去獲取access_token·(POST)
- 得到令牌
二、簡化模式
說明:提供相應的參數直接把token返回
http://127.0.0.1:8888/oauth/authorize?client_id=admin&response_type=token&scop=all&redirect_uri=http://www.baidu.com
三 賬號密碼模式
四 客戶端模式(安全性最差)
客戶端攜帶客戶端標識和祕鑰還有授權類型即可
http://127.0.0.1:8888/oauth/token?client_id=admin&client_secret=admin&grant_type=client_credentials