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>

用户令牌(如果存在)。

适用于