RolesAuthorizationRequirement Class
Definition
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.
Implements an IAuthorizationHandler and IAuthorizationRequirement which requires at least one role claim whose value must be any of the allowed roles.
public ref class RolesAuthorizationRequirement : Microsoft::AspNetCore::Authorization::AuthorizationHandler<Microsoft::AspNetCore::Authorization::Infrastructure::RolesAuthorizationRequirement ^>, Microsoft::AspNetCore::Authorization::IAuthorizationRequirement
public class RolesAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler<Microsoft.AspNetCore.Authorization.Infrastructure.RolesAuthorizationRequirement>, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement
type RolesAuthorizationRequirement = class
inherit AuthorizationHandler<RolesAuthorizationRequirement>
interface IAuthorizationRequirement
Public Class RolesAuthorizationRequirement
Inherits AuthorizationHandler(Of RolesAuthorizationRequirement)
Implements IAuthorizationRequirement
- Inheritance
- Implements
Constructors
RolesAuthorizationRequirement(IEnumerable<String>) |
Creates a new instance of RolesAuthorizationRequirement. |
Properties
AllowedRoles |
Gets the collection of allowed roles. |
Methods
HandleAsync(AuthorizationHandlerContext) |
Makes a decision if authorization is allowed. (Inherited from AuthorizationHandler<TRequirement>) |
HandleRequirementAsync(AuthorizationHandlerContext, RolesAuthorizationRequirement) |
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. |