feat(Auth): Erstellung eines Authentifizierungsmodells anstelle der direkten Verwendung des Zugriffscodes.

This commit is contained in:
Developer 02
2024-11-28 23:38:51 +01:00
parent 0469f057c9
commit f1ca1e9067
3 changed files with 7 additions and 3 deletions

View File

@@ -150,7 +150,7 @@ namespace EnvelopeGenerator.Web.Controllers
}
[HttpPost("EnvelopeKey/{envelopeReceiverId}/Locked")]
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] string access_code)
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] Auth auth)
{
try
{
@@ -169,7 +169,7 @@ namespace EnvelopeGenerator.Web.Controllers
//check access code
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
var verification = await _envRcvService.VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: access_code);
var verification = await _envRcvService.VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: auth.AccessCode!);
if (verification.IsFailed)
{
_logger.LogNotice(verification.Notices);