oauth2的四種模式和刷新令牌的請求地址及參數


1.1獲取code碼
http://127.0.0.1:9091/oauth/authorize?response_type=code&client_id=client1
1.2用code模式獲取token
http://127.0.0.1:9091/oauth/token?client_id=client1&client_secret=123&grant_type=authorization_code&code=MnPDgC

2.簡化授權碼模式
http://localhost:8080/oauth/authorize?response_type=token&client_id=banana&redirect_uri=http://baidu.com
http://127.0.0.1:9091/oauth/authorize?response_type=token&client_id=client1

3.password模式獲取token
http://127.0.0.1:9091/oauth/token?client_id=client1&client_secret=123&grant_type=password&username=admin&password=123

4.客戶端模式獲取token
http://127.0.0.1:9091/oauth/token?grant_type=client_credentials

5.通過刷新令牌獲取token
http://127.0.0.1:9091/oauth/token?client_id=client1&client_secret=123&grant_type=refresh_token&refresh_token=16a423f7-210d-432d-967e-827ff5f54554


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM