Fengling Auth Service - 认证服务
Go to file
2026-02-25 17:25:25 +08:00
bin\Debug/net10.0 refactor: clean up Member module and update Console 2026-02-18 23:34:40 +08:00
Configuration 调整项目 2026-02-21 15:05:37 +08:00
Controllers 调整项目 2026-02-21 15:05:37 +08:00
Properties first commit 2026-02-03 15:30:12 +08:00
ViewModels refactor: clean up Member module and update Console 2026-02-18 23:34:40 +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
.gitignore Add .gitignore 2026-02-25 17:25:25 +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 debug 2026-02-19 21:40:22 +08:00
Fengling.AuthService.http feat(auth): create authentication service project structure 2026-02-01 23:23:56 +08:00
Program.cs 调整项目 2026-02-21 15:05:37 +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