I have the following method:
[ClaimsPrincipalPermission(SecurityAction.Demand, Resource = "Order", Operation = "Place")]
public string PlaceNewOrder() { }
When the AuthorizationContext.Principal
does not have the required Claims
, a SecurityException is thrown (as expected). Unfortunately, all the properties of this exception (such as Action
or Demanded
) are null
.
Is there a way to get to the attribute information from the exception? It would be nice if you can show the user which specific claim caused the failure.