UserManager<TUser>.SetAuthenticationTokenAsync 方法

定义

设置用户的身份验证令牌。

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetAuthenticationTokenAsync(TUser user, System::String ^ loginProvider, System::String ^ tokenName, System::String ^ tokenValue);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetAuthenticationTokenAsync (TUser user, string loginProvider, string tokenName, string tokenValue);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetAuthenticationTokenAsync (TUser user, string loginProvider, string tokenName, string? tokenValue);
abstract member SetAuthenticationTokenAsync : 'User * string * string * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetAuthenticationTokenAsync : 'User * string * string * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetAuthenticationTokenAsync (user As TUser, loginProvider As String, tokenName As String, tokenValue As String) As Task(Of IdentityResult)

参数

user
TUser
loginProvider
String

与令牌关联的提供程序的身份验证方案。

tokenName
String

令牌的名称。

tokenValue
String

令牌的值。

返回

用户是否已成功更新。

适用于