Commit Graph

28 Commits

Author SHA1 Message Date
sam
8184f77c0f chore: update gitignore to allow Vben packages directory 2026-02-13 21:34:52 +08:00
Sam
5d097d8582 feat: 添加Console API认证和OpenIddict集成
- 配置AuthService使用OpenIddict reference tokens
- 添加fengling-api客户端用于introspection验证
- 配置Console API通过OpenIddict验证reference tokens
- 实现Tenant/Users/Roles/OAuthClients CRUD API
- 添加GatewayController服务注册API
- 重构Repository和Service层支持多租户

BREAKING CHANGE: API认证现在使用OpenIddict reference tokens
2026-02-08 19:01:25 +08:00
Sam
0c5bd5e647 feat: 添加OAuth2认证配置和实现
添加OAuth2认证相关配置文件和服务实现,包括环境变量配置、PKCE流程支持、token管理等功能。主要变更:
- 新增OAuth2配置文件
- 实现OAuth2服务层
- 更新请求拦截器支持token自动刷新
- 修改认证API和store以支持OAuth2流程
2026-02-07 17:47:11 +08:00
Sam
1a0c18c198 fix: simplify OpenIddict server configuration
- Remove non-existent method calls (AllowAuthorizationCodeFlow, etc)
- Keep only basic configuration: issuer, encryption, scopes
- This should fix 'authorization endpoint must be enabled' error
2026-02-06 21:59:06 +08:00
Sam
875ba7bc61 fix: add UseAspNetCore() to OpenIddict validation
- Add .UseAspNetCore() to validation configuration
- This enables OpenIddict Server to properly process OAuth2 requests
- Fix for 'The OpenID Connect request cannot be retrieved' error
2026-02-06 21:54:56 +08:00
Sam
7c92208c40 fix: remove invalid app.UseOpenIddictServer() call
- Remove non-existent middleware call
- OpenIddict server is automatically configured via AddOpenIddictConfiguration
- Keep correct middleware order: StaticFiles -> Routing -> Authentication -> Authorization
2026-02-06 21:50:50 +08:00
Sam
5a7ebaf20d feat: update OAuth2 client configuration for Fengling Console 2026-02-06 01:47:41 +08:00
Sam
d92d51fb3e feat: implement OAuth 2.0 login flow with auto-redirect
- Modify login page to auto-redirect to auth center
- Update auth store to use OAuth login flow
- Handle OAuth callback and token exchange
- Update logout to use OAuth logout endpoint
2026-02-06 01:14:11 +08:00
Sam
b6c85b1c4b fix: configure TenantInfo as owned entity and use AsNoTracking
- Add AsNoTracking to tenant query to avoid tracking conflicts
- Configure TenantInfo as owned entity in ApplicationUser
- Map TenantInfo properties to separate columns in AspNetUsers table
2026-02-06 00:55:58 +08:00
Sam
0472772d35 fix: use in-memory database for development environment 2026-02-06 00:51:28 +08:00
Sam
635e3b6c86 feat: configure OAuth client for Fengling Console
- Add localhost:5777 callback URIs to fengling-console client
- Register OIDC scopes: openid, profile, email
- Add support for development environment
2026-02-06 00:47:06 +08:00
Sam
c998686ab6 feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +08:00
Sam
02b446cfa7 first commit 2026-02-03 15:30:12 +08:00
Sam
1b815e59fd chore: add .gitignore and remove tracked binary files (bin, obj, dll, pdb) 2026-02-02 10:20:22 +08:00
Sam
9059c56515 feat(auth): pre-register Fengling.Console as OAuth client 2026-02-02 09:59:32 +08:00
Sam
cda6225bc5 feat(auth): add OAuth client management API 2026-02-02 09:58:55 +08:00
Sam
40b3184937 docs(auth): add API documentation 2026-02-02 09:55:23 +08:00
Sam
a7d87a98b7 feat(auth): add Dockerfile for containerization 2026-02-02 09:55:10 +08:00
Sam
58e6969e95 feat(auth): add health check endpoint 2026-02-02 09:54:36 +08:00
Sam
42976f09df feat(auth): add seed data for admin and test users 2026-02-02 09:53:06 +08:00
Sam
db3d345b86 chore: upgrade all projects to .NET 10.0 and latest packages 2026-02-02 01:04:51 +08:00
Sam
9a717b153f feat(auth): add authentication controller with login endpoint 2026-02-02 01:00:57 +08:00
Sam
baed266718 feat(auth): configure OpenIddict with JWT and OAuth2 support 2026-02-01 23:40:37 +08:00
Sam
9f414ccb74 feat(auth): add user and role models with EF Core migrations 2026-02-01 23:36:20 +08:00
Sam
9b389beafb feat(auth): upgrade all dependencies to latest versions 2026-02-01 23:31:33 +08:00
Sam
53e0978ad2 revert(auth): restore OpenIddict to 5.0.2 per spec 2026-02-01 23:25:08 +08:00
Sam
e3428d3bd6 chore(auth): upgrade OpenIddict to 7.2.0 2026-02-01 23:24:47 +08:00
Sam
3099abb710 feat(auth): create authentication service project structure 2026-02-01 23:23:56 +08:00