共用方式為


UserManager<TUser>.GetAuthenticationTokenAsync 方法

定義

傳回使用者的驗證權杖。

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

參數

user
TUser
loginProvider
String

與權杖相關聯之提供者的驗證配置。

tokenName
String

權杖的名稱。

傳回

使用者的驗證權杖

適用於