共用方式為


SignInManager<TUser>.SignInAsync 方法

定義

多載

SignInAsync(TUser, AuthenticationProperties, String)

登入指定的 user

SignInAsync(TUser, AuthenticationProperties, String)

登入指定的 user

SignInAsync(TUser, Boolean, String)

登入指定的 user

SignInAsync(TUser, AuthenticationProperties, String)

來源:
SignInManager.cs
來源:
SignInManager.cs
來源:
SignInManager.cs

登入指定的 user

public virtual System.Threading.Tasks.Task SignInAsync (TUser user, Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties, string authenticationMethod = default);
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties, string? authenticationMethod = default);
abstract member SignInAsync : 'User * Microsoft.AspNetCore.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
override this.SignInAsync : 'User * Microsoft.AspNetCore.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
Public Overridable Function SignInAsync (user As TUser, authenticationProperties As AuthenticationProperties, Optional authenticationMethod As String = Nothing) As Task

參數

user
TUser

要登入的使用者。

authenticationProperties
AuthenticationProperties

套用至登入和驗證 Cookie 的屬性。

authenticationMethod
String

用來驗證使用者的方法名稱。

傳回

工作物件,表示非同步作業。

適用於

SignInAsync(TUser, AuthenticationProperties, String)

登入指定的 user

public virtual System.Threading.Tasks.Task SignInAsync (TUser user, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties authenticationProperties, string authenticationMethod = default);
abstract member SignInAsync : 'User * Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
override this.SignInAsync : 'User * Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties * string -> System.Threading.Tasks.Task
Public Overridable Function SignInAsync (user As TUser, authenticationProperties As AuthenticationProperties, Optional authenticationMethod As String = Nothing) As Task

參數

user
TUser

要登入的使用者。

authenticationProperties
AuthenticationProperties

套用至登入和驗證 Cookie 的屬性。

authenticationMethod
String

用來驗證使用者的方法名稱。

傳回

工作物件,表示非同步作業。

適用於

SignInAsync(TUser, Boolean, String)

來源:
SignInManager.cs
來源:
SignInManager.cs
來源:
SignInManager.cs

登入指定的 user

public virtual System.Threading.Tasks.Task SignInAsync (TUser user, bool isPersistent, string authenticationMethod = default);
public virtual System.Threading.Tasks.Task SignInAsync (TUser user, bool isPersistent, string? authenticationMethod = default);
abstract member SignInAsync : 'User * bool * string -> System.Threading.Tasks.Task
override this.SignInAsync : 'User * bool * string -> System.Threading.Tasks.Task
Public Overridable Function SignInAsync (user As TUser, isPersistent As Boolean, Optional authenticationMethod As String = Nothing) As Task

參數

user
TUser

要登入的使用者。

isPersistent
Boolean

旗標,指出登入 Cookie 是否應該在瀏覽器關閉之後保存。

authenticationMethod
String

用來驗證使用者的方法名稱。

傳回

工作物件,表示非同步作業。

適用於