update to use ClaimsPrincipal instead of ControllerBase

This commit is contained in:
2025-08-22 22:29:51 +02:00
parent 6778d8e3e7
commit 0b33ba0fd8
3 changed files with 14 additions and 14 deletions

View File

@@ -38,14 +38,14 @@ namespace EnvelopeGenerator.Web.Controllers
public async Task<IActionResult> CreateAsync([FromBody] EnvelopeReceiverReadOnlyCreateDto createDto)
{
//set AddedWho
var authReceiverMail = this.GetAuthReceiverMail();
var authReceiverMail = User.GetAuthReceiverMail();
if (authReceiverMail is null)
{
_logger.LogError("EmailAddress clam is not found in envelope-receiver-read-only creation process. Create DTO is:\n {dto}", JsonConvert.SerializeObject(createDto));
return Unauthorized();
}
var envelopeId = this.GetAuthEnvelopeId();
var envelopeId = User.GetAuthEnvelopeId();
if (envelopeId is null)
{
_logger.LogError("Envelope Id clam is not found in envelope-receiver-read-only creation process. Create DTO is:\n {dto}", JsonConvert.SerializeObject(createDto));