AuthorizationContext Constructor (ClaimsPrincipal, Collection<Claim>, Collection<Claim>)

.NET Framework (current version)
 

Initializes a new instance of the AuthorizationContext class with the specified principal, resource claim, and action claim.

Namespace:   System.Security.Claims
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public AuthorizationContext(
	ClaimsPrincipal principal,
	Collection<Claim> resource,
	Collection<Claim> action
)

Parameters

principal
Type: System.Security.Claims.ClaimsPrincipal

The principal for which authorization is to be checked.

resource
Type: System.Collections.ObjectModel.Collection<Claim>

A collection of claims that represents the resource for which the principal is to be authorized. The collection typically contains a single element.

action
Type: System.Collections.ObjectModel.Collection<Claim>

A collection of claims that represents the action to be performed on the resource. The collection typically contains a single element.

Exception Condition
ArgumentNullException

principal is null.

-or-

resource is null.

-or-

action is null.

.NET Framework
Available since 4.5
Return to top
Show: