// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using System.Threading.Tasks; namespace Microsoft.AspNet.Identity { /// /// Provides an abstraction to store a flag indicating whether a user has two factor authentication enabled. /// /// The type encapsulating a user. public interface IUserTwoFactorStore : IUserStore where TUser : class { /// /// Sets a flag indicating whether the specified has two factor authentication enabled or not, /// as an asynchronous operation. /// /// The user whose two factor authentication enabled status should be set. /// A flag indicating whether the specified has two factor authentication enabled. /// The used to propagate notifications that the operation should be canceled. /// The that represents the asynchronous operation. Task SetTwoFactorEnabledAsync(TUser user, bool enabled, CancellationToken cancellationToken); /// /// Returns a flag indicating whether the specified has two factor authentication enabled or not, /// as an asynchronous operation. /// /// The user whose two factor authentication enabled status should be set. /// The used to propagate notifications that the operation should be canceled. /// /// The that represents the asynchronous operation, containing a flag indicating whether the specified /// has two factor authentication enabled or not. /// Task GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken); } }