AuthorizationExtensions.GetAuditIdentifier method
Gets the identifier of the user who is responsible for what the principal does, for the audit fields and logs, e.g. InsertUserId: the user who acts on behalf of the principal (Actor), e.g. an administrator who impersonates the user, else the user of the principal (GetIdentifier).
public static string? GetAuditIdentifier(this ClaimsPrincipal? identity)
| parameter | description |
|---|---|
| identity | The principal to extract the identifier from. |
Return Value
The identifier claim value, or null if the principal or claim is not present.
See Also
- class AuthorizationExtensions