Fengling Auth Service - 认证服务
Go to file
Kimi CLI 02c5d8c72d chore: add Npgsql log level config to suppress GSSAPI warnings
- Set Logging__LogLevel__Npgsql to Error in ConfigMap
- Prevents libgssapi_krb5.so.2 warning spam in logs
2026-03-08 15:21:27 +08:00
.gitea/workflows refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +08:00
.planning/codebase docs(architecture): 添加系统架构分析文档 2026-03-01 11:28:44 +08:00
k8s chore: add Npgsql log level config to suppress GSSAPI warnings 2026-03-08 15:21:27 +08:00
src refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +08:00
.dockerignore refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +08:00
.gitignore Add .gitignore 2026-02-25 17:25:25 +08:00
Directory.Packages.props refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +08:00
Dockerfile refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +08:00
Fengling.AuthService.slnx refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +08:00
NuGet.Config refactor: reorganize project structure to src/ with slnx solution 2026-02-28 18:31:52 +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