ImpersonationExtensions.ValidateNotImpersonating method
Throws a validation error with the RestrictedCode code while the user is impersonated, e.g. for an action on the security of the account, which the impersonator should not do as the user.
public static void ValidateNotImpersonating(this ClaimsPrincipal? user, ITextLocalizer? localizer)
| parameter | description |
|---|---|
| user | The principal. |
| localizer | The localizer of the message. |
See Also
- interface ITextLocalizer
- class ImpersonationExtensions