Update AuthController and Login model for API changes
- Updated API documentation in AuthController.cs to include an optional "id" field in the authentication request body. - Modified the Login record in Login.cs to require a "Password" field and include optional "Id" and "Username" fields, along with updated documentation comments.
This commit is contained in:
@@ -52,6 +52,12 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers
|
|||||||
/// "password": "Geheim123!"
|
/// "password": "Geheim123!"
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
|
/// POST /api/auth?cookie=true
|
||||||
|
/// {
|
||||||
|
/// "id": "1",
|
||||||
|
/// "password": "Geheim123!"
|
||||||
|
/// }
|
||||||
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
||||||
/// <response code="401">Unbefugt. Ungültiger Benutzername oder Passwort.</response>
|
/// <response code="401">Unbefugt. Ungültiger Benutzername oder Passwort.</response>
|
||||||
|
|||||||
@@ -3,13 +3,11 @@
|
|||||||
namespace EnvelopeGenerator.GeneratorAPI.Models;
|
namespace EnvelopeGenerator.GeneratorAPI.Models;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Anmeldedatenmodell
|
/// Repräsentiert ein Login-Modell mit erforderlichem Passwort und optionaler ID und Benutzername.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <summary lang="en-US">
|
/// <param name="Password">Das erforderliche Passwort für das Login.</param>
|
||||||
/// Login data model
|
/// <param name="Id">Die optionale ID des Benutzers.</param>
|
||||||
/// </summary>
|
/// <param name="Username">Der optionale Benutzername.</param>
|
||||||
/// <param name="Username">Active Directory user name</param>
|
public record Login([Required] string Password, int? Id = null, string? Username = null)
|
||||||
/// <param name="Password">Active Directory password</param>
|
|
||||||
public record Login([Required]string Username, [Required] string Password)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user