Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IUserTwoFactorLoginService

    A user specific Two factor service, that ensures the user exists before doing the job.

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IUserTwoFactorLoginService

    Methods

    View Source

    DisableAsync(Guid, String)

    Disables a specific two factor provider on a specific user.

    Declaration
    Task<Attempt<TwoFactorOperationStatus>> DisableAsync(Guid userKey, string providerName)
    Parameters
    Type Name Description
    Guid userKey
    System.String providerName
    Returns
    Type Description
    Task<Attempt<TwoFactorOperationStatus>>
    View Source

    DisableByCodeAsync(String, Guid, String)

    Disables 2FA with Code.

    Declaration
    Task<Attempt<TwoFactorOperationStatus>> DisableByCodeAsync(string providerName, Guid userKey, string code)
    Parameters
    Type Name Description
    System.String providerName
    Guid userKey
    System.String code
    Returns
    Type Description
    Task<Attempt<TwoFactorOperationStatus>>
    View Source

    GetProviderNamesAsync(Guid)

    Gets the two factor providers on a specific user.

    Declaration
    Task<Attempt<IEnumerable<UserTwoFactorProviderModel>, TwoFactorOperationStatus>> GetProviderNamesAsync(Guid userKey)
    Parameters
    Type Name Description
    Guid userKey
    Returns
    Type Description
    Task<Attempt<IEnumerable<UserTwoFactorProviderModel>, TwoFactorOperationStatus>>
    View Source

    GetSetupInfoAsync(Guid, String)

    Declaration
    Task<Attempt<ISetupTwoFactorModel, TwoFactorOperationStatus>> GetSetupInfoAsync(Guid userKey, string providerName)
    Parameters
    Type Name Description
    Guid userKey
    System.String providerName
    Returns
    Type Description
    Task<Attempt<ISetupTwoFactorModel, TwoFactorOperationStatus>>
    Remarks

    The returned type can be anything depending on the setup providers. You will need to cast it to the type handled by the provider.

    View Source

    ValidateAndSaveAsync(String, Guid, String, String)

    Validates and Saves.

    Declaration
    Task<Attempt<TwoFactorOperationStatus>> ValidateAndSaveAsync(string providerName, Guid userKey, string modelSecret, string modelCode)
    Parameters
    Type Name Description
    System.String providerName
    Guid userKey
    System.String modelSecret
    System.String modelCode
    Returns
    Type Description
    Task<Attempt<TwoFactorOperationStatus>>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX