ClaimsPrincipalPermission represents the permission required to access a resource. ClaimsPrincipalPermission takes in a string that represents the resource to be accessed, and a string that represents the action to be performed on the resource. When Demand is called, the principal must have the permission to perform the specified action on the specified resource, or Demand throws an exception. This permission is checked by CheckAccess.
下表列出了 ClaimsPrincipalPermission 类型公开的成员。
Public 构造函数
| 名称 | 说明 | |
|---|---|---|
| ClaimsPrincipalPermission | Creates an instance of the ClaimsPrincipalPermission class. | 
页首
Public 方法
(另请参阅 Protected 方法)
| 名称 | 说明 | |
|---|---|---|
| .gif) .gif) | CheckAccess | Checks if the current principal is authorized to perform the given action on the given resource. | 
| .gif) | Copy | Returns a copy of the current ClaimsPrincipalPermission instance. | 
| .gif) | Demand | Checks if the policy engine authorizes the current principal to perform the actions on the specified resources. | 
| .gif) | Equals | 已重载。 (从 Object 继承) | 
| .gif) | FromXml | Initializes the current instance from the SecurityElement. | 
| .gif) | GetHashCode | (从 Object 继承) | 
| .gif) | GetType | (从 Object 继承) | 
| .gif) | Intersect | Returns a new ClaimsPrincipalPermission object that has only those ResourceAction objects which are present in both the current instance and the target instance. | 
| .gif) | IsSubsetOf | Checks if all the ResourceAction objects contained in the current instance is also present in the target instance. | 
| .gif) | IsUnrestricted | Returns true if the permission is unrestricted; otherwise, returns false. | 
| .gif) .gif) | ReferenceEquals | (从 Object 继承) | 
| .gif) | ToString | (从 Object 继承) | 
| .gif) | ToXml | Returns the XML encoded form of the current instance. | 
| .gif) | Union | Returns a new ClaimsPrincipalPermission object that has the ResourceAction objects which are present in both the current instance and the target instance. | 
页首
Protected 方法
| 名称 | 说明 | |
|---|---|---|
| .gif) | Finalize | (从 Object 继承) | 
| .gif) | MemberwiseClone | (从 Object 继承) | 
页首
请参见
参考
ClaimsPrincipalPermission 类
Microsoft.IdentityModel.Claims 命名空间
版权所有 (C) 2008 Microsoft Corporation。保留所有权利。