Commit 7ca5270
authored
feat: support the expansion of other authentication methods (#3520)
#### What type of PR is this?
/kind feature
/milestone 2.4.0
/area core
#### What this PR does / why we need it:
支持扩展其他登录方式:
1. 增加 AdditionalWebFilter 扩展点,插件只需要实现此扩展点完成 Filter 逻辑
2. 增加 DynamicMatcherSecurityWebFilterChain 用于将 `apiFilterChain` 的 `SecurityWebFilterChain` 委托给此类,需要认证的请求都会 DynamicMatcherSecurityWebFilterChain 的过滤器进行处理,所以 `AdditionalWebFilter` 可以通过 order 将扩展的过滤器放到这条链上的任何位置。
3. 将表单登录改为实现扩展点的实现
4. 增加 ExtensionPointDefinition 和 ExtensionDefinition 自定义模型用于对扩展点和扩展进行描述
5. 提供 AuthProvider 自定义模型用于记录支持的登录方式提供商
6. 提供 UserConnection 自定义模型用于将第三方登录账号信息与当前系统账户进行绑定
how to test it?
1. 测试表单登录功能是否正常
2. 测试插件的 plugin-oauth-github 的 PR halo-sigs/plugin-oauth2#3 功能是否正常
#### Which issue(s) this PR fixes:
Fixes #3423
#### Does this PR introduce a user-facing change?
```release-note
支持扩展其他的认证方式
```1 parent f7eb0cd commit 7ca5270
File tree
66 files changed
+6609
-97
lines changed- console
- packages
- api-client/src
- .openapi-generator
- api
- models
- components/src/icons
- src
- components/login
- composables
- modules
- system
- actuator/types
- auth-providers
- components
- users
- layouts
- utils
- src
- main
- java/run/halo/app
- actuator
- config
- core/extension
- endpoint
- infra
- plugin
- extensionpoint
- security
- authentication
- login
- logout
- resources/extensions
- test/java/run/halo/app/security
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
66 files changed
+6609
-97
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
| |||
92 | 107 | | |
93 | 108 | | |
94 | 109 | | |
| 110 | + | |
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
| |||
155 | 171 | | |
156 | 172 | | |
157 | 173 | | |
| 174 | + | |
158 | 175 | | |
159 | 176 | | |
160 | 177 | | |
| |||
176 | 193 | | |
177 | 194 | | |
178 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
179 | 199 | | |
180 | 200 | | |
181 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
0 commit comments