Share via


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.SetTwoFactorEnabledAsync Metodo

Definizione

Imposta un flag che indica se l'autenticazione a due fattori specificata user è abilitata o meno, come operazione asincrona.

public virtual System.Threading.Tasks.Task SetTwoFactorEnabledAsync (TUser user, bool enabled, System.Threading.CancellationToken cancellationToken = default);
abstract member SetTwoFactorEnabledAsync : 'User * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SetTwoFactorEnabledAsync : 'User * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function SetTwoFactorEnabledAsync (user As TUser, enabled As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

user
TUser

L'utente il cui stato abilitato per l'autenticazione a due fattori deve essere impostato.

enabled
Boolean

Flag che indica se l'autenticazione a due fattori specificata user è abilitata.

cancellationToken
CancellationToken

Oggetto CancellationToken usato per propagare le notifiche di richiesta di annullamento dell'operazione.

Restituisce

Oggetto Task che rappresenta l'operazione asincrona.

Implementazioni

Si applica a