A lightweight ASP.NET Core Web API for authenticating users by license key and Hardware ID (HWID). Built as the authentication backend for the Milau CS2 ESP project.
- License and HWID validation against a database
- Dependency Injection with a service/interface layer (
IAuthService) - Entity Framework Core with MSSQL for database access
- Returns clear success/failure responses with user details
Cheat Client → POST /api/v1/auth → AuthController → IAuthService → EF Core → MSSQL
- ASP.NET Core Web API
- Layered architecture (Controller → Service → Repository)
- EF Core Code-First with MSSQL
POST /api/v1/auth
Request body:
{
"license": "your-license-key",
"hwid": "your-hardware-id"
}Success response (200):
{
"message": "Authentication successful",
"user": {
"license": "your-license-key",
"hwid": "your-hardware-id"
}
}Failure response (401):
{
"message": "Invalid license or HWID",
"user": {
"license": "your-license-key",
"hwid": "your-hardware-id"
}
}- C# / .NET 8
- ASP.NET Core Web API
- Entity Framework Core
- MSSQL (via EF Core)
Clone the repository:
git clone https://github.com/Mathias-Skov/Milau_API.git
cd Milau_APIEdit appsettings.json with your database connection string:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=MilauDb;Trusted_Connection=True;"
}
}Run migrations:
dotnet ef database updateBuild and run:
dotnet run- .NET 8 SDK
- MSSQL Server
https://github.com/Mathias-Skov/Milau
This API was built purely for educational purposes as a companion to the Milau CS2 ESP project — to learn about building authentication services with ASP.NET Core and Entity Framework Core.