diff --git a/Endpoint/Controllers/V1/AuthController.cs b/Endpoint/Controllers/V1/AuthController.cs index 2fb1e7a..3946c56 100644 --- a/Endpoint/Controllers/V1/AuthController.cs +++ b/Endpoint/Controllers/V1/AuthController.cs @@ -29,12 +29,21 @@ public class AuthController(IOptionsSnapshot user, AuthService auth, Pass Path = UrlHelper.GetSubPathWithoutFirstApiName + "api" }; + /// + /// Gets the list of available OAuth providers with their respective redirect URIs. + /// + /// A list of available providers. [HttpGet("GetAvailableProviders")] public ActionResult> GetUrls() => Ok(oAuthService .GetAvailableProviders(HttpContext, GetCookieParams(), HttpContext.GetApiUrl(Url.Action("OAuth2")!)) .ConvertToDto()); + /// + /// Logs in a user using their username or email and password. + /// + /// The login request containing username/email and password. + /// A TwoFactorAuthentication token if the login is successful; otherwise, a BadRequest response. [HttpPost("Login")] [BadRequestResponse] public async Task> Login([FromBody] LoginRequest request) @@ -63,6 +72,11 @@ public class AuthController(IOptionsSnapshot user, AuthService auth, Pass return Ok(tokenResult.ConvertToDto()); } + /// + /// Performs two-factor authentication for the user. + /// + /// The request containing the method and code for two-factor authentication. + /// A boolean indicating whether the two-factor authentication was successful. [HttpPost("2FA")] [BadRequestResponse] public async Task> TwoFactorAuth([FromBody] TwoFactorAuthRequest request)