[TOC]
# 自定義uaa-server-spring-boot-starter
uaa-server-spring-boot-starter深度擴展spring cloud oauth2/ spring security封裝平臺通用認證服務能力,,在不同的項目中,可能會要求使用jwt token,也可能會要求使用redis token,平臺需要封裝統一的認證能力,應對不同項目的技術要求 。
## 認證中心功能
* 通用認證接口
* 通用的token生成機制(TokenStore)
* 通用的訪問控制(com.open.capacity.uaa.config.SecurityConfig,com.open.capacity.uaa.UAAServerConfig,com.open.capacity.uaa.common.UAAClientAutoConfig)
* 通用的異常配置(SecurityHandlerConfig,ExceptionHandlerAdvice)
* 通用的驗證碼校驗
### 認證授權服務器處理流程

### 認證授權類關系圖

### oauth2的角色和流程

### oauth2 客戶端應用信息處理

### oauth2 客戶端應用表結構

### 認證服務器配置

### security配置
配置多用戶插件工廠,登錄處理器。

### 基于插件用戶模型


### oauth2的核心入口

### oauth2的模式

#### 模式驗證

#### 默認模式配置

通過以上配置,/oauth/token的grant_type會有以下模式
* 客戶端模式

* 密碼模式


* 授權碼
[ http://127.0.0.1:8000/api-auth/oauth/authorize?client_id=owen&redirect_uri=http://127.0.0.1:9997/clientOne/login&state=abc&scope=app&response_type=code](http://127.0.0.1:8000/api-auth/oauth/authorize?client_id=owen&redirect_uri=http://127.0.0.1:9997/clientOne/login&state=abc&scope=app&response_type=code)
跳轉統一登錄頁面,登錄成功獲取授權碼
http://127.0.0.1:9997/clientOne/login?code=gd6jyM&state=abc

授權碼存取策略

* 刷新模式

#### 擴展模式配置

### openId模式

#### openId granter

#### openId provider

#### openid config

### 圖形驗證碼模式
#### 獲取驗證碼

#### 根據驗證碼獲取token

#### password code granter

### 二維碼谷歌動態驗證碼模式
#### 選擇動態令牌方式登錄,展現二維碼,掃碼后輸入動態驗證碼

#### 通過微信小程序搜索二次驗證碼掃碼獲取動態令牌輸入動態驗證碼

#### 接口信息

#### google password模式

#### 注意以上兩種granter繼承實現的類不同
* AbstractTokenGranter
* ResourceOwnerPasswordTokenGranter
### security配置
配置擴展安全認證信息

### security handler配置
配置登錄異常成功等處理器

### token 生成流程

通過以下方式生成token

#### 監控redis 的操作情況
~~~
D:\soft\redis>redis-cli.exe -h 59.110.164.254 -p 6379
59.110.164.254:6379> select 2
OK
59.110.164.254:6379[2]> monitor
~~~

### 重復登錄認證之基于websocket的重復登錄提示

### 基于websocket的架構設計

### 后端處理邏輯

### 前端處理

- 01.前言
- 02.快速開始
- 01.maven構建項目
- 02.安裝mysql數據庫
- 03.安裝redis緩存中間件
- 04.快速啟動框架
- 03.總體流程
- 01.架構設計圖
- 02.oauth接口
- 03.功能介紹
- 04.部署細節
- 04.模塊詳解
- 01.基礎介紹
- 02.自定義db-spring-boot-starter
- 03.自定義log-spring-boot-starter
- 04.自定義redis-spring-boot-starter
- 05.自定義base-spring-boot-starter
- 06.自定義common-spring-boot-starter
- 07.自定義loadbalancer-spring-boot-starter
- 08.自定義swagger-spring-boot-starter
- 09.自定義uaa-client-spring-boot-starter
- 10.自定義uaa-server-spring-boot-starter
- 11.自定義oss-spring-boot-starter
- 12.自定義sentinel-spring-boot-starter
- 05.服務詳解
- 01.nacos-server
- 02.auth-server
- 03.user-center
- 04.new-api-gateway
- 05.file-center
- 06.log-center
- 07.back-center
- 08.auth-sso模塊
- 09.admin-server
- 10.job-center
- 06.系統安全
- 01.非法字符漏洞攻擊
- 02.防重放攻擊
- 03.代碼審計
- 04.Xray掃洞
- 05.混沌工程質量保證
- 07.生產部署K8S
- 01.基本環境安裝
- 02.基本組件安裝
- 03.集群驗證
- 04.安裝Metrics Server
- 05.安裝容器平臺
- 06.Ingress網關
- 07.metalb負載均衡器
- 08.容器平臺集群
- 08.K8S資源練習
- 01.Deployment
- 02.StatefulSet
- 03.DaemonSet
- 04.redis集群服務
- 05.elasticsearch集群
- 06.rocketmq部署
- 09.生產容器化部署
- 01.nacos集群部署
- 02.user-center服務
- 03.auth-server服務
- 04.new-api-gateway服務
- 技術交流