Aktualisierte EnvelopeClaims

This commit is contained in:
Developer 02
2024-05-24 11:39:12 +02:00
parent 7863e861c7
commit b60ae62779
8 changed files with 46 additions and 4 deletions

View File

@@ -154,10 +154,18 @@ namespace EnvelopeGenerator.Web.Controllers
return this.ViewDocumentNotFound();
}
var claims = new List<Claim> { new(ClaimTypes.NameIdentifier, uuid), new(ClaimTypes.Hash, signature) };
var claims = new List<Claim> {
new(ClaimTypes.NameIdentifier, uuid),
new(ClaimTypes.Hash, signature),
new(ClaimTypes.Name, er.Name ?? string.Empty),
new(ClaimTypes.Email, er.Receiver.EmailAddress),
new(EnvelopeClaimTypes.Title, er.Envelope.Title)
};
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
var authProperties = new AuthenticationProperties { };
var authProperties = new AuthenticationProperties {
AllowRefresh = false
};
await HttpContext.SignInAsync(
CookieAuthenticationDefaults.AuthenticationScheme,