From 9450ed348615dbda5ae28c3adf88588ee0a71218 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 3 Feb 2026 10:45:17 +0100 Subject: [PATCH] Remove old Login endpoint and related documentation Removed the previous Login method from AuthController, including its XML documentation and Swagger/OpenAPI annotations. This prepares the controller for a revised authentication implementation. --- .../Controllers/AuthController.cs | 67 ------------------- 1 file changed, 67 deletions(-) diff --git a/EnvelopeGenerator.API/Controllers/AuthController.cs b/EnvelopeGenerator.API/Controllers/AuthController.cs index 29e5b868..b280a437 100644 --- a/EnvelopeGenerator.API/Controllers/AuthController.cs +++ b/EnvelopeGenerator.API/Controllers/AuthController.cs @@ -1,5 +1,3 @@ -using DigitalData.Core.Abstraction.Application; -using DigitalData.UserManager.Application.Contracts; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Mvc; @@ -16,71 +14,6 @@ namespace EnvelopeGenerator.API.Controllers; [ApiController] public partial class AuthController(ILogger logger) : ControllerBase { - /// - /// Authentifiziert einen Benutzer und generiert ein JWT-Token. Wenn 'cookie' wahr ist, wird das Token als HTTP-Only-Cookie zurückgegeben. - /// - /// Benutzeranmeldedaten (Benutzername und Passwort). - /// Wenn wahr, wird das JWT-Token auch als HTTP-Only-Cookie gesendet. - /// - /// Gibt eine HTTP 200 oder 401. - /// - /// - /// Sample request: - /// - /// POST /api/auth?cookie=true - /// { - /// "username": "MaxMustermann", - /// "password": "Geheim123!" - /// } - /// - /// POST /api/auth?cookie=true - /// { - /// "id": "1", - /// "password": "Geheim123!" - /// } - /// - /// - /// Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist. - /// Unbefugt. Ungültiger Benutzername oder Passwort. - [ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")] - [ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)] - [AllowAnonymous] - [HttpPost] - public Task Login([FromBody] Login login, [FromQuery] bool cookie = false) - { - // added to configure open API (swagger and scalar) - throw new NotImplementedException(); - } - - /// - /// Authentifiziert einen Benutzer und generiert ein JWT-Token. Das Token wird als HTTP-only-Cookie zurückgegeben. - /// - /// Benutzeranmeldedaten (Benutzername und Passwort). - /// - /// Gibt eine HTTP 200 oder 401. - /// - /// - /// Sample request: - /// - /// POST /api/auth/form - /// { - /// "username": "MaxMustermann", - /// "password": "Geheim123!" - /// } - /// - /// - /// Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist. - /// Unbefugt. Ungültiger Benutzername oder Passwort. - [ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")] - [ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)] - [AllowAnonymous] - [HttpPost] - [Route("form")] - public Task Login([FromForm] Login login) - { - // added to configure open API (swagger and scalar) - throw new NotImplementedException(); - } /// /// Entfernt das Authentifizierungs-Cookie des Benutzers (AuthCookie)