mirror of https://github.com/halo-dev/halo
![]() #### 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 https://github.com/halo-sigs/plugin-oauth-github/pull/3 功能是否正常 #### Which issue(s) this PR fixes: Fixes #3423 #### Does this PR introduce a user-facing change? ```release-note 支持扩展其他的认证方式 ``` |
||
---|---|---|
.. | ||
.changeset | ||
.husky | ||
.vscode | ||
cypress | ||
docs | ||
packages | ||
public | ||
src | ||
.editorconfig | ||
.env.development | ||
.env.production | ||
.eslintrc.cjs | ||
.gitignore | ||
.gitpod.yml | ||
.npmignore | ||
.npmrc | ||
.prettierignore | ||
Makefile | ||
OWNERS | ||
README.md | ||
cypress.json | ||
env.d.ts | ||
index.html | ||
package.json | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
postcss.config.js | ||
prettier.config.js | ||
tailwind.config.js | ||
tsconfig.app.json | ||
tsconfig.json | ||
tsconfig.vite-config.json | ||
tsconfig.vitest.json | ||
vite.config.ts | ||
vitest.config.ts |