AuthorizationHandlerContext AuthorizationHandlerContext AuthorizationHandlerContext Class

Definition

Contains authorization information used by IAuthorizationHandler.

public class AuthorizationHandlerContext
type AuthorizationHandlerContext = class
Public Class AuthorizationHandlerContext
Inheritance
AuthorizationHandlerContextAuthorizationHandlerContextAuthorizationHandlerContext

Constructors

AuthorizationHandlerContext(IEnumerable<IAuthorizationRequirement>, ClaimsPrincipal, Object) AuthorizationHandlerContext(IEnumerable<IAuthorizationRequirement>, ClaimsPrincipal, Object) AuthorizationHandlerContext(IEnumerable<IAuthorizationRequirement>, ClaimsPrincipal, Object)

Creates a new instance of AuthorizationHandlerContext.

Properties

HasFailed HasFailed HasFailed

Flag indicating whether the current authorization processing has failed.

HasSucceeded HasSucceeded HasSucceeded

Flag indicating whether the current authorization processing has succeeded.

PendingRequirements PendingRequirements PendingRequirements

Gets the requirements that have not yet been marked as succeeded.

Requirements Requirements Requirements

The collection of all the IAuthorizationRequirement for the current authorization action.

Resource Resource Resource

The optional resource to evaluate the Requirements against.

User User User

The ClaimsPrincipal representing the current user.

Methods

Fail() Fail() Fail()

Called to indicate HasSucceeded will never return true, even if all requirements are met.

Succeed(IAuthorizationRequirement) Succeed(IAuthorizationRequirement) Succeed(IAuthorizationRequirement)

Called to mark the specified requirement as being successfully evaluated.

Applies to