03.oauth-center

基於spring security 保護的restful框架:Spring Cloud oauth
參考https://gitee.com/owenwangwen/open-capacity-platform項目

OAuth2分爲四個角色:資源擁有者、資源服務器、授權服務器、客戶端

03.oauth-center

open-oauth-center oauth2 認證服務器 資源服務器分離架構中心

03.oauth-center

open-oauth-server 認證中心
03.oauth-center

客戶端模式
03.oauth-center

密碼模式
03.oauth-center

授權碼模式
1.獲取授權碼
http://localhost:8000/oauth/authorize?client_id=webApp&redirect_uri=http://www.baidu.com&state=abc&scope=app&response_type=code

2.授權碼換token
03.oauth-center

open-oauth-client open-oauth-client-two open-api-gateway 均爲資源服務器

03.oauth-center

源碼分析
03.oauth-center

資源服務器校驗覈心邏輯

03.oauth-center

認證服務器 資源服務器統一實現配置tokenstore,同時直接連接redis校驗token是否有效
03.oauth-center
RemoteTokenServices
一般爲單點登錄sso時使用,此方式需要通過http方式連接認證中心,同時還需要訪問redis,多一層網絡連接,建議不採用此方式

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