Fengling Auth Service - 认证服务
Go to file
2026-02-13 21:34:52 +08:00
Configuration feat: 添加Console API认证和OpenIddict集成 2026-02-08 19:01:25 +08:00
Controllers feat: 添加OAuth2认证配置和实现 2026-02-07 17:47:11 +08:00
Data chore: update gitignore to allow Vben packages directory 2026-02-13 21:34:52 +08:00
Migrations feat: 添加Console API认证和OpenIddict集成 2026-02-08 19:01:25 +08:00
Models feat: 添加OAuth2认证配置和实现 2026-02-07 17:47:11 +08:00
Properties first commit 2026-02-03 15:30:12 +08:00
ViewModels feat: 添加OAuth2认证配置和实现 2026-02-07 17:47:11 +08:00
Views feat: 添加OAuth2认证配置和实现 2026-02-07 17:47:11 +08:00
wwwroot/css feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +08:00
.dockerignore feat(auth): add Dockerfile for containerization 2026-02-02 09:55:10 +08:00
appsettings.Development.json chore: update gitignore to allow Vben packages directory 2026-02-13 21:34:52 +08:00
appsettings.json chore: update gitignore to allow Vben packages directory 2026-02-13 21:34:52 +08:00
appsettings.Testing.json first commit 2026-02-03 15:30:12 +08:00
Dockerfile feat(auth): add Dockerfile for containerization 2026-02-02 09:55:10 +08:00
Fengling.AuthService.csproj feat: 添加OAuth2认证配置和实现 2026-02-07 17:47:11 +08:00
Fengling.AuthService.http feat(auth): create authentication service project structure 2026-02-01 23:23:56 +08:00
Program.cs feat: 添加OAuth2认证配置和实现 2026-02-07 17:47:11 +08:00
README.md docs(auth): add API documentation 2026-02-02 09:55:23 +08:00

Fengling Auth Service

Authentication and authorization service using OpenIddict.

Features

  • JWT token issuance
  • OAuth2/OIDC support
  • Multi-tenant support (TenantId in JWT claims)
  • Role-based access control (RBAC)
  • Health check endpoint

API Endpoints

Get Token

POST /connect/token
Content-Type: application/x-www-form-urlencoded

grant_type=password
username={username}
password={password}
scope=api offline_access

Health Check

GET /health

Default Users

  • Admin: username=admin, password=Admin@123, role=Admin
  • Test User: username=testuser, password=Test@123, role=User

Running Locally

dotnet run

Service runs on port 5000.

Docker

docker build -t fengling-auth:latest .
docker run -p 5000:80 fengling-auth:latest

Environment Variables

  • ConnectionStrings__DefaultConnection: PostgreSQL connection string
  • OpenIddict__Issuer: Token issuer URL
  • OpenIddict__Audience: Token audience

Database

  • PostgreSQL
  • Uses ASP.NET Core Identity for user/role management
  • Tenant isolation via TenantId column