SignInManager<TUser>.PasswordSignInAsync 方法

定義

多載

PasswordSignInAsync(String, String, Boolean, Boolean)

嘗試以非同步作業的形式登入指定的 userNamepassword 組合。

PasswordSignInAsync(TUser, String, Boolean, Boolean)

嘗試以非同步作業的形式登入指定的 userpassword 組合。

PasswordSignInAsync(String, String, Boolean, Boolean)

嘗試以非同步作業的形式登入指定的 userNamepassword 組合。

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::SignInResult ^> ^ PasswordSignInAsync(System::String ^ userName, System::String ^ password, bool isPersistent, bool lockoutOnFailure);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult> PasswordSignInAsync (string userName, string password, bool isPersistent, bool lockoutOnFailure);
abstract member PasswordSignInAsync : string * string * bool * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult>
override this.PasswordSignInAsync : string * string * bool * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult>
Public Overridable Function PasswordSignInAsync (userName As String, password As String, isPersistent As Boolean, lockoutOnFailure As Boolean) As Task(Of SignInResult)

參數

userName
String

要登入的使用者名稱。

password
String

嘗試使用 登入的密碼。

isPersistent
Boolean

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

lockoutOnFailure
Boolean

旗標,指出登入失敗時,是否應該鎖定使用者帳戶。

傳回

工作物件,表示包含 登入嘗試之 的 非同步作業。

適用於

PasswordSignInAsync(TUser, String, Boolean, Boolean)

嘗試以非同步作業的形式登入指定的 userpassword 組合。

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::SignInResult ^> ^ PasswordSignInAsync(TUser user, System::String ^ password, bool isPersistent, bool lockoutOnFailure);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult> PasswordSignInAsync (TUser user, string password, bool isPersistent, bool lockoutOnFailure);
abstract member PasswordSignInAsync : 'User * string * bool * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult>
override this.PasswordSignInAsync : 'User * string * bool * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.SignInResult>
Public Overridable Function PasswordSignInAsync (user As TUser, password As String, isPersistent As Boolean, lockoutOnFailure As Boolean) As Task(Of SignInResult)

參數

user
TUser

要登入的使用者。

password
String

嘗試使用 登入的密碼。

isPersistent
Boolean

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

lockoutOnFailure
Boolean

旗標,指出登入失敗時,是否應該鎖定使用者帳戶。

傳回

工作物件,表示包含 登入嘗試之 的 非同步作業。

適用於