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 FeatureAuthorizeHandler class.
Declaration
public FeatureAuthorizeHandler(IFeatureAuthorizer featureAuthorizer, IRuntimeState runtimeState)
Parameters
| Type | Name | Description |
|---|---|---|
| IFeatureAuthorizer | featureAuthorizer | Authorizer for Umbraco features. |
| IRuntimeState | 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 |
|---|---|---|
| AuthorizationHandlerContext | context | The authorization context. |
| FeatureAuthorizeRequirement | requirement |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | True if request is authorized, false if not. |