Megosztás a következőn keresztül:


ClaimsAuthorizationRequirement Class

Definition

Implements an IAuthorizationHandler and IAuthorizationRequirement which requires at least one instance of the specified claim type, and, if allowed values are specified, the claim value must be any of the allowed values.

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

Constructors

ClaimsAuthorizationRequirement(String, IEnumerable<String>)

Creates a new instance of ClaimsAuthorizationRequirement.

Properties

AllowedValues

Gets the optional list of claim values, which, if present, the claim must match.

ClaimType

Gets the claim type that must be present.

Methods

HandleAsync(AuthorizationHandlerContext)

Makes a decision if authorization is allowed.

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

Makes a decision if authorization is allowed based on the claims requirements specified.

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