SignInManager<TUser>.SignInAsync 方法

定义

重载

SignInAsync(TUser, AuthenticationProperties, String)

在指定的 user中登录。

SignInAsync(TUser, AuthenticationProperties, String)

在指定的 user中登录。

SignInAsync(TUser, Boolean, String)

在指定的 user中登录。

SignInAsync(TUser, AuthenticationProperties, String)

Source:
SignInManager.cs
Source:
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)

Source:
SignInManager.cs
Source:
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

用于对用户进行身份验证的方法的名称。

返回

表示异步操作的任务对象。

适用于