Class DenyLocalLoginHandler
Ensures the resource cannot be accessed if HasDenyLocalLogin() returns true.
Inheritance
System.Object
Microsoft.AspNetCore.Authorization.AuthorizationHandler<DenyLocalLoginRequirement>
Namespace: Umbraco.Cms.Web.BackOffice.Authorization
Assembly: Umbraco.Web.BackOffice.dll
Syntax
public class DenyLocalLoginHandler : MustSatisfyRequirementAuthorizationHandler<DenyLocalLoginRequirement>, IAuthorizationHandler
Constructors
View SourceDenyLocalLoginHandler(IBackOfficeExternalLoginProviders)
Initializes a new instance of the DenyLocalLoginHandler class.
Declaration
public DenyLocalLoginHandler(IBackOfficeExternalLoginProviders externalLogins)
Parameters
| Type | Name | Description |
|---|---|---|
| IBackOfficeExternalLoginProviders | externalLogins | Provides access to BackOfficeExternalLoginProvider instances. |
Methods
View SourceIsAuthorized(AuthorizationHandlerContext, DenyLocalLoginRequirement)
Return true if the requirement is succeeded or ignored, return false if the requirement is explicitly not met
Declaration
protected override Task<bool> IsAuthorized(AuthorizationHandlerContext context, DenyLocalLoginRequirement requirement)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext | context | The authorization context. |
| DenyLocalLoginRequirement | requirement |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | True if request is authorized, false if not. |