共用方式為


UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>.FindTokenAsync 方法

定義

如果存在,請尋找使用者權杖。

protected:
 override System::Threading::Tasks::Task<TUserToken> ^ FindTokenAsync(TUser user, System::String ^ loginProvider, System::String ^ name, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserToken> FindTokenAsync (TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserToken?> FindTokenAsync (TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken);
override this.FindTokenAsync : 'User * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'UserToken (requires 'UserToken :> Microsoft.AspNetCore.Identity.IdentityUserToken<'Key> and 'UserToken : (new : unit -> 'UserToken))>
Protected Overrides Function FindTokenAsync (user As TUser, loginProvider As String, name As String, cancellationToken As CancellationToken) As Task(Of TUserToken)

參數

user
TUser

權杖擁有者。

loginProvider
String

權杖的登入提供者。

name
String

權杖的名稱。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

Task<TUserToken>

如果使用者權杖存在,則為 。

適用於