feat: migrate AuthController to FastEndpoints Endpoints (Phase 1)
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m31s
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m31s
IMPLEMENTATION:
- Create 4 FastEndpoints Endpoint classes:
- LoginEndpoint: POST /api/auth/login
- RefreshTokenEndpoint: POST /api/auth/refresh
- ChangePasswordEndpoint: POST /api/auth/change-password
- ResetPasswordEndpoint: POST /api/auth/reset-password
- Backup AuthController.cs (no longer active)
- Add FastEndpoints.Endpoint<TRequest, TResponse> pattern
- Implement proper DI with AuthService injection
- Use Policies("Bearer") for authorization
- Proper error handling with ThrowError()
ARCHITECTURE:
- Start of Phase 1: Core Auth APIs
- Endpoints follow FastEndpoints conventions
- DTOs: LoginRequest, RefreshTokenRequest, ChangePasswordRequest, ResetPasswordRequest, TokenPairResponse, MessageResponse
- AllowAnonymous for login/refresh/reset
- Bearer policy for change-password
VERIFICATION:
✅ dotnet build: 0 errors, 0 warnings
✅ dotnet test: 26/26 passed
✅ FastEndpoints auto-discovery working (no endpoint errors)
✅ JWT validation passes
Next Phase: BlogController and remaining APIs
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="TaxBaik">
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#1f3c88"/>
|
||||
<stop offset="100%" stop-color="#d7a86e"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="64" height="64" rx="16" fill="url(#g)"/>
|
||||
<path d="M18 24h28v6H18zM22 32h20v6H22zM26 40h12v6H26z" fill="#fff" opacity="0.95"/>
|
||||
<path d="M16 18h32v2H16z" fill="#ffffff" opacity="0.35"/>
|
||||
<circle cx="46" cy="18" r="5" fill="#fff" opacity="0.9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 564 B |
Reference in New Issue
Block a user