Microsoft.AspNetCore.Authorization.Infrastructure Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains types that enable support for authorization.
Classes
AssertionRequirement |
Implements an IAuthorizationHandler and IAuthorizationRequirement that takes a user specified assertion. |
ClaimsAuthorizationRequirement |
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. |
DenyAnonymousAuthorizationRequirement |
Implements an IAuthorizationHandler and IAuthorizationRequirement which requires the current user must be authenticated. This calls Succeed(IAuthorizationRequirement) for authenticated users. Like all built-in requirements, it never calls Fail(). The DefaultAuthorizationEvaluator produces a failed AuthorizationResult when any requirement has not succeeded even if other requirements have succeeded, and no requirement has explicitly failed. |
NameAuthorizationRequirement |
Implements an IAuthorizationHandler and IAuthorizationRequirement which requires the current user name must match the specified value. |
OperationAuthorizationRequirement |
A helper class to provide a useful IAuthorizationRequirement which contains a name. |
PassThroughAuthorizationHandler |
Infrastructure class which allows an IAuthorizationRequirement to be its own IAuthorizationHandler. |
RolesAuthorizationRequirement |
Implements an IAuthorizationHandler and IAuthorizationRequirement which requires at least one role claim whose value must be any of the allowed roles. |
Remarks
For more information about authorization, see Introduction to authorization in ASP.NET Core.