feat(backend): start authentication controllers

This commit is contained in:
sam 2024-06-12 03:47:20 +02:00
parent 493a6e4d29
commit 25540f2de2
15 changed files with 777 additions and 17 deletions

View file

@ -6,9 +6,11 @@ namespace Foxnouns.Backend.Controllers.Authentication;
[Route("/api/v2/auth/discord")]
public class DiscordAuthController(Config config, DatabaseContext db) : ApiControllerBase
{
[HttpPost("url")]
public async Task<IActionResult> AuthenticationUrl()
private void CheckRequirements()
{
throw new NotImplementedException();
if (config.DiscordAuth.ClientId == null || config.DiscordAuth.ClientSecret == null)
{
throw new ApiError.BadRequest("Discord authentication is not enabled on this instance.");
}
}
}