Fengling Auth Service - 认证服务
Go to file
2026-02-05 14:21:36 +08:00
Configuration first commit 2026-02-03 15:30:12 +08:00
Controllers feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +08:00
Data feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +08:00
Models feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +08:00
Properties first commit 2026-02-03 15:30:12 +08:00
ViewModels first commit 2026-02-03 15:30:12 +08:00
Views feat(console): complete migration of User, Tenant, and Role management APIs 2026-02-05 14:21:36 +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 feat(auth): create authentication service project structure 2026-02-01 23:23:56 +08:00
appsettings.json first commit 2026-02-03 15:30:12 +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 first commit 2026-02-03 15:30:12 +08:00
Fengling.AuthService.http feat(auth): create authentication service project structure 2026-02-01 23:23:56 +08:00
Program.cs first commit 2026-02-03 15:30:12 +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