Share via


UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.FindByLoginAsync Metodo

Definizione

Recupera l'utente associato al provider di accesso e alla chiave del provider di accesso specificati.

public virtual System.Threading.Tasks.Task<TUser> FindByLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<TUser?> FindByLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default);
abstract member FindByLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
override this.FindByLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
Public Overridable Function FindByLoginAsync (loginProvider As String, providerKey As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TUser)

Parametri

loginProvider
String

Provider di accesso che ha fornito l'oggetto providerKey.

providerKey
String

Chiave fornita da loginProvider per identificare un utente.

cancellationToken
CancellationToken

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

Restituisce

Task<TUser>

Oggetto Task per l'operazione asincrona contenente l'utente, se corrispondente al provider di accesso e alla chiave specificati.

Implementazioni

Si applica a