IUserTwoFactorStore<TUser> Interface

Summary

Provides an abstraction to store a flag indicating whether a user has two factor authentication enabled.

Syntax

public interface IUserTwoFactorStore<TUser> : IUserStore<TUser>, IDisposable where TUser : class

GitHub

View on GitHub

interface Microsoft.AspNet.Identity.IUserTwoFactorStore<TUser>

Methods

GetTwoFactorEnabledAsync(TUser, System.Threading.CancellationToken)

Returns a flag indicating whether the specified ``user ``has two factor authentication enabled or not, as an asynchronous operation.

Arguments:
  • user ({TUser}) – The user whose two factor authentication enabled status should be set.
  • cancellationToken (System.Threading.CancellationToken) – The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Return type:

System.Threading.Tasks.Task{System.Boolean}

Returns:

The <see cref=”T:System.Threading.Tasks.Task” /> that represents the asynchronous operation, containing a flag indicating whether the specified

<paramref name=”user ” />has two factor authentication enabled or not.

Task<bool> GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken)
SetTwoFactorEnabledAsync(TUser, System.Boolean, System.Threading.CancellationToken)

Sets a flag indicating whether the specified ``user ``has two factor authentication enabled or not, as an asynchronous operation.

Arguments:
  • user ({TUser}) – The user whose two factor authentication enabled status should be set.
  • enabled (System.Boolean) – A flag indicating whether the specified user has two factor authentication enabled.
  • cancellationToken (System.Threading.CancellationToken) – The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Return type:

System.Threading.Tasks.Task

Returns:

The <see cref=”T:System.Threading.Tasks.Task” /> that represents the asynchronous operation.

Task SetTwoFactorEnabledAsync(TUser user, bool enabled, CancellationToken cancellationToken)