ClaimsPrincipalPermission(String, String) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new instance of the ClaimsPrincipalPermission class.
public:
ClaimsPrincipalPermission(System::String ^ resource, System::String ^ action);
public ClaimsPrincipalPermission (string resource, string action);
new System.IdentityModel.Services.ClaimsPrincipalPermission : string * string -> System.IdentityModel.Services.ClaimsPrincipalPermission
Public Sub New (resource As String, action As String)
Parameters
- resource
- String
The resource on which the principal should be authorized.
- action
- String
The action for which the principal should be authorized.
Exceptions
resource
is null
or an empty string.
action
is null
.
Remarks
The ClaimsPrincipalPermission object is initialized with the specified resource-action pair. You can call the Demand method to perform an access check.
Although the constructor only takes a single resource and action, ClaimsPrincipalPermission objects can be combined through the Union and Intersect methods. The permission created through these methods may contain multiple resource-action pairs.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om