Commit Graph

7 Commits

Author SHA1 Message Date
5b37dbf854 Add POST /auth/login for Windows credential auth
Introduced a new endpoint to AuthController that allows authentication using Windows username, password, and optional domain via the Win32 LogonUser API. This enables credential validation without NTLM/Negotiate middleware or IIS. The endpoint parses both "DOMAIN\user" and "user@domain" formats and returns user info and claims on success, or Unauthorized on failure. Added necessary using directives for implementation.
2026-03-13 10:36:54 +01:00
ee9f4abc95 Add NtlmHelper for NTLM credential validation via LogonUser
Introduced the NtlmHelper static class in the FakeNTLMServer.Common namespace. This class provides a ValidateCredentials method that uses P/Invoke to call the Windows LogonUser API, allowing validation of NTLM credentials and returning a SafeAccessTokenHandle on success. Constants for logon type and provider are included, and token validity is checked.
2026-03-13 10:35:59 +01:00
d8c87f25d8 Add Login model with username, password, and domain fields
Introduced a Login class in the FakeNTLMServer.Model namespace to represent user credentials. The model includes required Username and Password properties, supporting various username formats, and an optional Domain property that defaults to the local machine if not specified.
2026-03-13 10:31:12 +01:00
8a8006874d Refactor AuthController and add NTLM login endpoint
Refactored AuthController to improve attribute usage and code clarity. Added three endpoints: /auth/me (user info), /auth/login (NTLM/Negotiate authentication with user info or 401), and /auth/status (authenticated user status). Responses are now more structured and informative. Applied [Authorize] only to relevant endpoints. Improved code organization and documentation.
2026-03-13 10:02:19 +01:00
8505259714 Add AuthController with /auth/me user info endpoint
Introduced AuthController secured with [Authorize] attribute.
Provides a GET /auth/me endpoint that returns the authenticated
user's identity details and claims.
2026-03-03 09:17:36 +01:00
9033e67b82 Initial ASP.NET Core Web API with NTLM auth and Swagger
Set up FakeNTLMServer project targeting .NET 8.0 with Windows Authentication (Negotiate) and Swagger/OpenAPI support. Added project and solution files, configured authentication and authorization in Program.cs, and included launch settings and logging configuration for development and production environments.
2026-03-03 09:17:25 +01:00
7874306b8d Initial commit 2026-03-03 09:14:49 +01:00