Dela via


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.FindTokenAsync Method

Definition

Find a user token if it exists.

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)

Parameters

user
TUser

The token owner.

loginProvider
String

The login provider for the token.

name
String

The name of the token.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

Task<TUserToken>

The user token if it exists.

Applies to