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

權杖的值。

傳回

使用者是否已成功更新。

適用於