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


Microsoft.AspNetCore.Authorization Namespace

Contains types that enable support for authorization. The main types are IAuthorizationRequirement (marker interface representing a requirement which must be met), IAuthorizationHandler (interface that's responsible for determining if requirements have been met), and AuthorizationPolicyBuilder (used for building AuthorizationPolicy objects that define named lists of requirements).

Classes

AllowAnonymousAttribute

Specifies that the class or method that this attribute is applied to does not require authorization.

AuthorizationBuilder

Used to configure authorization

AuthorizationFailure

Encapsulates a failure result of AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>).

AuthorizationFailureReason

Encapsulates a reason why authorization failed.

AuthorizationHandler<TRequirement>

Base class for authorization handlers that need to be called for a specific requirement type.

AuthorizationHandler<TRequirement,TResource>

Base class for authorization handlers that need to be called for specific requirement and resource types.

AuthorizationHandlerContext

Contains authorization information used by IAuthorizationHandler.

AuthorizationMiddleware

A middleware that enables authorization capabilities.

AuthorizationOptions

Provides programmatic configuration used by IAuthorizationService and IAuthorizationPolicyProvider.

AuthorizationPolicy

Represents a collection of authorization requirements and the scheme or schemes they are evaluated against, all of which must succeed for authorization to succeed.

AuthorizationPolicyBuilder

Used for building policies.

AuthorizationResult

Encapsulates the result of AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>).

AuthorizationServiceExtensions

Extension methods for IAuthorizationService.

AuthorizeAttribute

Specifies that the class or method that this attribute is applied to requires the specified authorization.

DefaultAuthorizationEvaluator

Determines whether an authorization request was successful or not.

DefaultAuthorizationHandlerContextFactory

A type used to provide a AuthorizationHandlerContext used for authorization.

DefaultAuthorizationHandlerProvider

The default implementation of a handler provider, which provides the IAuthorizationHandlers for an authorization request.

DefaultAuthorizationPolicyProvider

The default implementation of a policy provider, which provides a AuthorizationPolicy for a particular name.

DefaultAuthorizationService

The default implementation of an IAuthorizationService.

Interfaces

IAllowAnonymous

Marker interface to allow access to anonymous users.

IAuthorizationEvaluator

Determines whether an authorization request was successful or not.

IAuthorizationHandler

Classes implementing this interface are able to make a decision if authorization is allowed.

IAuthorizationHandlerContextFactory

A type used to provide a AuthorizationHandlerContext used for authorization.

IAuthorizationHandlerProvider

A type which can provide the IAuthorizationHandlers for an authorization request.

IAuthorizationMiddlewareResultHandler

Allow custom handling of authorization and handling of the authorization response.

IAuthorizationPolicyProvider

A type which can provide a AuthorizationPolicy for a particular name.

IAuthorizationRequirement

Represents an authorization requirement.

IAuthorizationRequirementData

Interface that can produce authorization requirements.

IAuthorizationService

Checks policy based permissions for a user

IAuthorizeData

Defines the set of data required to apply authorization rules to a resource.

Remarks

For more information about authorization, see Introduction to authorization in ASP.NET Core.