Class FeatureAuthorizeHandler
Authorizes that the controller is an authorized Umbraco feature.
Namespace: Umbraco.Cms.Api.Management.Security.Authorization.Feature
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public class FeatureAuthorizeHandler : MustSatisfyRequirementAuthorizationHandler<FeatureAuthorizeRequirement>
Constructors
View SourceFeatureAuthorizeHandler(IFeatureAuthorizer, IRuntimeState)
Initializes a new instance of the Feature
Declaration
public FeatureAuthorizeHandler(IFeatureAuthorizer featureAuthorizer, IRuntimeState runtimeState)
Parameters
Type | Name | Description |
---|---|---|
IFeature |
featureAuthorizer | Authorizer for Umbraco features. |
IRuntime |
runtimeState | The runtime state. |
Methods
View SourceIsAuthorized(AuthorizationHandlerContext, FeatureAuthorizeRequirement)
Returns
Declaration
protected override async Task<bool> IsAuthorized(AuthorizationHandlerContext context, FeatureAuthorizeRequirement requirement)
Parameters
Type | Name | Description |
---|---|---|
Authorization |
context | The authorization context. |
Feature |
requirement |
Returns
Type | Description |
---|---|
Task<System. |
True if request is authorized, false if not. |