Search Results for

    Show / Hide Table of Contents
    View Source

    Class AuthorizationServiceExtensions

    Contains extension methods for working with authorization services in Umbraco.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Cms.Api.Management.dll
    Syntax
    public static class AuthorizationServiceExtensions

    Methods

    View Source

    AuthorizeResourceAsync(IAuthorizationService, ClaimsPrincipal, IPermissionResource, string)

    Asynchronously authorizes a resource using the specified authorization service, user, resource, and policy name.

    Declaration
    public static Task<AuthorizationResult> AuthorizeResourceAsync(this IAuthorizationService authorizationService, ClaimsPrincipal user, IPermissionResource resource, string policyName)
    Parameters
    Type Name Description
    IAuthorizationService authorizationService

    The authorization service to use for authorization.

    ClaimsPrincipal user

    The claims principal representing the user to authorize.

    IPermissionResource resource

    The resource to authorize.

    string policyName

    The name of the authorization policy to apply.

    Returns
    Type Description
    Task<AuthorizationResult>

    A task that represents the asynchronous authorization operation. The task result contains the authorization result.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX