License Gen and Verification added to core

This commit is contained in:
2026-05-17 04:06:28 -04:00
parent 9fbe795660
commit 1ed3efcc68
3 changed files with 52 additions and 4 deletions

View File

@@ -48,9 +48,16 @@ public static class AuthEndpoints
Console.WriteLine($"UN: {request.Username}\nToken: {request.Token}");
return Results.Ok(valid);
});
app.MapPost("/server/verify/license", async (AuthServerLicense request, APIAuthService service) =>
app.MapPost("/server/license/generate", async (AuthServerLicenseGenerate request, APIAuthService service) =>
{
throw new NotImplementedException();
var license = await service.ServerLicenseGenerate(request);
return license != null ? Results.Ok(license) : Results.BadRequest();
});
app.MapPost("/server/license/verify", async (AuthServerLicenseVerify request, APIAuthService service) =>
{
bool valid = await service.ServerVerifyLicense(request);
return Results.Ok(valid);
});
}
}