Search Results for

    Show / Hide Table of Contents
    View Source

    Class TwoFactorLoginController

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    public class TwoFactorLoginController : UmbracoAuthorizedJsonController

    Constructors

    View Source

    TwoFactorLoginController(IBackOfficeSecurityAccessor, ILogger<TwoFactorLoginController>, ITwoFactorLoginService, IBackOfficeSignInManager, IBackOfficeUserManager, IOptionsSnapshot<TwoFactorLoginViewOptions>)

    Declaration
    public TwoFactorLoginController(IBackOfficeSecurityAccessor backOfficeSecurityAccessor, ILogger<TwoFactorLoginController> logger, ITwoFactorLoginService twoFactorLoginService, IBackOfficeSignInManager backOfficeSignInManager, IBackOfficeUserManager backOfficeUserManager, IOptionsSnapshot<TwoFactorLoginViewOptions> twoFactorLoginViewOptions)
    Parameters
    Type Name Description
    IBackOfficeSecurityAccessor backOfficeSecurityAccessor
    Microsoft.Extensions.Logging.ILogger<TwoFactorLoginController> logger
    ITwoFactorLoginService twoFactorLoginService
    IBackOfficeSignInManager backOfficeSignInManager
    IBackOfficeUserManager backOfficeUserManager
    Microsoft.Extensions.Options.IOptionsSnapshot<TwoFactorLoginViewOptions> twoFactorLoginViewOptions

    Methods

    View Source

    Disable(String, Guid)

    Declaration
    [HttpPost]
    [Authorize(Policy = "SectionAccessUsers")]
    public async Task<ActionResult<bool>> Disable(string providerName, Guid userKey)
    Parameters
    Type Name Description
    System.String providerName
    System.Guid userKey
    Returns
    Type Description
    System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Boolean>>
    View Source

    DisableWithCode(String, String)

    Declaration
    [HttpPost]
    public async Task<ActionResult<bool>> DisableWithCode(string providerName, string code)
    Parameters
    Type Name Description
    System.String providerName
    System.String code
    Returns
    Type Description
    System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Boolean>>
    View Source

    Get2FAProvidersForUser(Int32)

    Declaration
    [HttpGet]
    public async Task<ActionResult<IEnumerable<UserTwoFactorProviderModel>>> Get2FAProvidersForUser(int userId)
    Parameters
    Type Name Description
    System.Int32 userId
    Returns
    Type Description
    System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Collections.Generic.IEnumerable<UserTwoFactorProviderModel>>>
    View Source

    GetEnabled2FAProvidersForCurrentUser()

    Used to retrieve the 2FA providers for code submission

    Declaration
    [HttpGet]
    [AllowAnonymous]
    public async Task<ActionResult<IEnumerable<string>>> GetEnabled2FAProvidersForCurrentUser()
    Returns
    Type Description
    System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Collections.Generic.IEnumerable<System.String>>>
    View Source

    SetupInfo(String)

    Declaration
    [HttpGet]
    public async Task<ActionResult<object>> SetupInfo(string providerName)
    Parameters
    Type Name Description
    System.String providerName
    Returns
    Type Description
    System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Object>>
    View Source

    ValidateAndSave(String, String, String)

    Declaration
    [HttpPost]
    public async Task<ActionResult<bool>> ValidateAndSave(string providerName, string secret, string code)
    Parameters
    Type Name Description
    System.String providerName
    System.String secret
    System.String code
    Returns
    Type Description
    System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Boolean>>
    View Source

    ViewPathForProviderName(String)

    Declaration
    [HttpGet]
    public ActionResult<string> ViewPathForProviderName(string providerName)
    Parameters
    Type Name Description
    System.String providerName
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<System.String>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX