ClaimsPrincipalPermission.CheckAccess Method (String, String)
Checks if the current principal is authorized to perform the specified action on the specified resource.
Assembly: System.IdentityModel.Services (in System.IdentityModel.Services.dll)
The principal must be authorized for the specified action on the specified resource or the SecurityException exception is thrown.
The ClaimsAuthorizationManager.CheckAccess method of the configured claims authorization manager is invoked with an AuthorizationContext composed of the active principal (CurrentPrincipal), the resource, and the action.
The following example shows how to protect a resource by using the SecurityException is thrown; otherwise, execution proceeds.method. The configured claims authorization manager is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a
Available since 4.5