AuthorizationContext Constructor (ClaimsPrincipal^, String^, String^)

.NET Framework (current version)
 

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

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

public:
AuthorizationContext(
	ClaimsPrincipal^ principal,
	String^ resource,
	String^ action
)

Parameters

principal
Type: System.Security.Claims::ClaimsPrincipal^

The principal for which authorization is to be checked.

resource
Type: System::String^

The resource for which the principal is to be authorized. The resource is specified as the value of a name claim.

action
Type: System::String^

The action to be performed on the resource. The action is specified as the value of a name claim.

Exception Condition
ArgumentNullException

principal is null.

-or-

resource is null.

-or-

action is null.

The Action property is initialized to contain a name claim (ClaimTypes::Name) that has the value specified by the action parameter. The Resource property is initialized to contain a name claim that has the value specified by the resource parameter.

.NET Framework
Available since 4.5
Return to top
Show: