NameAuthorizationRequirement Class

Definition

Implements an IAuthorizationHandler and IAuthorizationRequirement which requires the current user name must match the specified value.

public ref class NameAuthorizationRequirement : Microsoft::AspNetCore::Authorization::AuthorizationHandler<Microsoft::AspNetCore::Authorization::Infrastructure::NameAuthorizationRequirement ^>, Microsoft::AspNetCore::Authorization::IAuthorizationRequirement
public class NameAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler<Microsoft.AspNetCore.Authorization.Infrastructure.NameAuthorizationRequirement>, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement
type NameAuthorizationRequirement = class
    inherit AuthorizationHandler<NameAuthorizationRequirement>
    interface IAuthorizationRequirement
Public Class NameAuthorizationRequirement
Inherits AuthorizationHandler(Of NameAuthorizationRequirement)
Implements IAuthorizationRequirement
Inheritance
Implements

Constructors

NameAuthorizationRequirement(String)

Constructs a new instance of NameAuthorizationRequirement.

Properties

RequiredName

Gets the required name that the current user must have.

Methods

HandleAsync(AuthorizationHandlerContext)

Makes a decision if authorization is allowed.

(Inherited from AuthorizationHandler<TRequirement>)
HandleRequirementAsync(AuthorizationHandlerContext, NameAuthorizationRequirement)

Makes a decision if authorization is allowed based on a specific requirement.

HandleRequirementAsync(AuthorizationHandlerContext, TRequirement)

Makes a decision if authorization is allowed based on a specific requirement.

(Inherited from AuthorizationHandler<TRequirement>)
ToString()

Returns a string that represents the current object.

Applies to