NameAuthorizationRequirement 类

定义

实现 , IAuthorizationHandlerIAuthorizationRequirement 要求当前用户名必须与指定的值匹配。

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
继承
实现

构造函数

NameAuthorizationRequirement(String)

构造 NameAuthorizationRequirement 的新实例。

属性

RequiredName

获取当前用户必须具有的所需名称。

方法

HandleAsync(AuthorizationHandlerContext)

决定是否允许授权。

(继承自 AuthorizationHandler<TRequirement>)
HandleRequirementAsync(AuthorizationHandlerContext, NameAuthorizationRequirement)

根据特定要求决定是否允许授权。

HandleRequirementAsync(AuthorizationHandlerContext, TRequirement)

根据特定要求决定是否允许授权。

(继承自 AuthorizationHandler<TRequirement>)
ToString()

实现 , IAuthorizationHandlerIAuthorizationRequirement 要求当前用户名必须与指定的值匹配。

适用于