SignInManager<TUser>.PasswordSignInAsync 方法

定义

重载

PasswordSignInAsync(String, String, Boolean, Boolean)

尝试将指定的 userNamepassword 组合作为异步操作登录。

PasswordSignInAsync(TUser, String, Boolean, Boolean)

尝试将指定的 userpassword 组合作为异步操作登录。

PasswordSignInAsync(String, String, Boolean, Boolean)

Source:
SignInManager.cs
Source:
SignInManager.cs
Source:
SignInManager.cs

尝试将指定的 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)

Source:
SignInManager.cs
Source:
SignInManager.cs
Source:
SignInManager.cs

尝试将指定的 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

指示在登录失败时是否应锁定用户帐户的标志。

返回

表示异步操作的任务对象, 其中包含用于登录尝试的 。

适用于