feat(TFARegController): Authentifizierungsbedingung zum Registrierungsendpunkt hinzugefügt
This commit is contained in:
@@ -200,6 +200,9 @@ public class HomeController : ViewControllerBase
|
||||
rcv.TotpSecretkey = _authenticator.GenerateTotpSecretKey();
|
||||
await _rcvService.UpdateAsync(rcv);
|
||||
}
|
||||
|
||||
await HttpContext.SignInEnvelopeAsync(er_secret, ReceiverRole.PreAuth);
|
||||
|
||||
return await TFAViewAsync(auth.UserSelectSMS, er_secret, envelopeReceiverId);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using EnvelopeGenerator.Application.Resources;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class TFARegController : ViewControllerBase
|
||||
_params = tfaRegParamsOptions.Value;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet("{envelopeReceiverId}")]
|
||||
public async Task<IActionResult> Reg(string envelopeReceiverId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user