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:
parent
f0ed6137d1
commit
0147f525fa
@ -51,6 +51,12 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers
|
||||
/// "username": "MaxMustermann",
|
||||
/// "password": "Geheim123!"
|
||||
/// }
|
||||
///
|
||||
/// POST /api/auth?cookie=true
|
||||
/// {
|
||||
/// "id": "1",
|
||||
/// "password": "Geheim123!"
|
||||
/// }
|
||||
///
|
||||
/// </remarks>
|
||||
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
||||
|
||||
@ -3,13 +3,11 @@
|
||||
namespace EnvelopeGenerator.GeneratorAPI.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Anmeldedatenmodell
|
||||
/// Repräsentiert ein Login-Modell mit erforderlichem Passwort und optionaler ID und Benutzername.
|
||||
/// </summary>
|
||||
/// <summary lang="en-US">
|
||||
/// Login data model
|
||||
/// </summary>
|
||||
/// <param name="Username">Active Directory user name</param>
|
||||
/// <param name="Password">Active Directory password</param>
|
||||
public record Login([Required]string Username, [Required] string Password)
|
||||
/// <param name="Password">Das erforderliche Passwort für das Login.</param>
|
||||
/// <param name="Id">Die optionale ID des Benutzers.</param>
|
||||
/// <param name="Username">Der optionale Benutzername.</param>
|
||||
public record Login([Required] string Password, int? Id = null, string? Username = null)
|
||||
{
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user