UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.SetTwoFactorEnabledAsync Method

Asynchronously sets the Two Factor provider for the user.

Namespace:  Microsoft.AspNet.Identity.EntityFramework
Assembly:  Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)

Syntax

'Declaration
Public Function SetTwoFactorEnabledAsync ( _
    user As TUser, _
    enabled As Boolean _
) As Task
'Usage
Dim instance As UserStore 
Dim user As TUser
Dim enabled As Boolean 
Dim returnValue As Task 

returnValue = instance.SetTwoFactorEnabledAsync(user, _
    enabled)
public Task SetTwoFactorEnabledAsync(
    TUser user,
    bool enabled
)
public:
virtual Task^ SetTwoFactorEnabledAsync(
    TUser user, 
    bool enabled
) sealed
abstract SetTwoFactorEnabledAsync : 
        user:'TUser * 
        enabled:bool -> Task  
override SetTwoFactorEnabledAsync : 
        user:'TUser * 
        enabled:bool -> Task
public final function SetTwoFactorEnabledAsync(
    user : TUser, 
    enabled : boolean
) : Task

Parameters

  • user
    Type: TUser
    The user.
  • enabled
    Type: System.Boolean
    true to enable the Two Factor provider; otherwise, false.

Return Value

Type: System.Threading.Tasks.Task
The task representing the asynchronous operation.

Implements

IUserTwoFactorStore<TUser, TKey>.SetTwoFactorEnabledAsync(TUser, Boolean)

See Also

Reference

UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> Class

Microsoft.AspNet.Identity.EntityFramework Namespace

Other Resources

ASP.NET Identity