UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>.FindUserLoginAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
FindUserLoginAsync(TKey, String, String, CancellationToken) |
如果存在,則傳回具有相符 userId、provider、providerKey 的使用者登入。 |
FindUserLoginAsync(String, String, CancellationToken) |
傳回具有提供者、providerKey 的使用者登入。如果存在,則傳回 providerKey。 |
FindUserLoginAsync(TKey, String, String, CancellationToken)
如果存在,則傳回具有相符 userId、provider、providerKey 的使用者登入。
protected:
override System::Threading::Tasks::Task<TUserLogin> ^ FindUserLoginAsync(TKey userId, System::String ^ loginProvider, System::String ^ providerKey, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserLogin> FindUserLoginAsync (TKey userId, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserLogin?> FindUserLoginAsync (TKey userId, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken);
override this.FindUserLoginAsync : 'Key * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'UserLogin (requires 'UserLogin :> Microsoft.AspNetCore.Identity.IdentityUserLogin<'Key> and 'UserLogin : (new : unit -> 'UserLogin))>
Protected Overrides Function FindUserLoginAsync (userId As TKey, loginProvider As String, providerKey As String, cancellationToken As CancellationToken) As Task(Of TUserLogin)
參數
- userId
- TKey
使用者的識別碼。
- loginProvider
- String
登入提供者名稱。
- providerKey
- String
提供的 loginProvider
金鑰,用來識別使用者。
- cancellationToken
- CancellationToken
用於散佈應取消作業通知的 CancellationToken。
傳回
Task<TUserLogin>
如果使用者存在,則為登入。
適用於
FindUserLoginAsync(String, String, CancellationToken)
傳回具有提供者、providerKey 的使用者登入。如果存在,則傳回 providerKey。
protected:
override System::Threading::Tasks::Task<TUserLogin> ^ FindUserLoginAsync(System::String ^ loginProvider, System::String ^ providerKey, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserLogin> FindUserLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserLogin?> FindUserLoginAsync (string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken);
override this.FindUserLoginAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'UserLogin (requires 'UserLogin :> Microsoft.AspNetCore.Identity.IdentityUserLogin<'Key> and 'UserLogin : (new : unit -> 'UserLogin))>
Protected Overrides Function FindUserLoginAsync (loginProvider As String, providerKey As String, cancellationToken As CancellationToken) As Task(Of TUserLogin)
參數
- loginProvider
- String
登入提供者名稱。
- providerKey
- String
提供的 loginProvider
金鑰,用來識別使用者。
- cancellationToken
- CancellationToken
用於散佈應取消作業通知的 CancellationToken。
傳回
Task<TUserLogin>
如果使用者存在,則為登入。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應