AuthenticationHttpContextExtensions.SignInAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SignInAsync(HttpContext, ClaimsPrincipal) |
为默认身份验证方案登录主体。 可以使用 配置 DefaultSignInScheme用于登录的默认方案。 |
SignInAsync(HttpContext, ClaimsPrincipal, AuthenticationProperties) |
为默认身份验证方案登录主体。 可以使用 配置 DefaultSignInScheme用于登录的默认方案。 |
SignInAsync(HttpContext, String, ClaimsPrincipal) |
为指定方案登录主体。 |
SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties) |
为指定方案登录主体。 |
SignInAsync(HttpContext, ClaimsPrincipal)
为默认身份验证方案登录主体。 可以使用 配置 DefaultSignInScheme用于登录的默认方案。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ SignInAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::Security::Claims::ClaimsPrincipal ^ principal);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, System.Security.Claims.ClaimsPrincipal principal);
static member SignInAsync : Microsoft.AspNetCore.Http.HttpContext * System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task
<Extension()>
Public Function SignInAsync (context As HttpContext, principal As ClaimsPrincipal) As Task
参数
- context
- HttpContext
上下文 HttpContext 。
- principal
- ClaimsPrincipal
用户。
返回
任务。
适用于
SignInAsync(HttpContext, ClaimsPrincipal, AuthenticationProperties)
为默认身份验证方案登录主体。 可以使用 配置 DefaultSignInScheme用于登录的默认方案。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ SignInAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::Security::Claims::ClaimsPrincipal ^ principal, Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties);
static member SignInAsync : Microsoft.AspNetCore.Http.HttpContext * System.Security.Claims.ClaimsPrincipal * Microsoft.AspNetCore.Authentication.AuthenticationProperties -> System.Threading.Tasks.Task
<Extension()>
Public Function SignInAsync (context As HttpContext, principal As ClaimsPrincipal, properties As AuthenticationProperties) As Task
参数
- context
- HttpContext
上下文 HttpContext 。
- principal
- ClaimsPrincipal
用户。
- properties
- AuthenticationProperties
返回
任务。
适用于
SignInAsync(HttpContext, String, ClaimsPrincipal)
为指定方案登录主体。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ SignInAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme, System::Security::Claims::ClaimsPrincipal ^ principal);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, string scheme, System.Security.Claims.ClaimsPrincipal principal);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, string? scheme, System.Security.Claims.ClaimsPrincipal principal);
static member SignInAsync : Microsoft.AspNetCore.Http.HttpContext * string * System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task
<Extension()>
Public Function SignInAsync (context As HttpContext, scheme As String, principal As ClaimsPrincipal) As Task
参数
- context
- HttpContext
上下文 HttpContext 。
- scheme
- String
身份验证方案的名称。
- principal
- ClaimsPrincipal
用户。
返回
任务。
适用于
SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties)
为指定方案登录主体。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task ^ SignInAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme, System::Security::Claims::ClaimsPrincipal ^ principal, Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, string scheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
public static System.Threading.Tasks.Task SignInAsync (this Microsoft.AspNetCore.Http.HttpContext context, string? scheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties);
static member SignInAsync : Microsoft.AspNetCore.Http.HttpContext * string * System.Security.Claims.ClaimsPrincipal * Microsoft.AspNetCore.Authentication.AuthenticationProperties -> System.Threading.Tasks.Task
<Extension()>
Public Function SignInAsync (context As HttpContext, scheme As String, principal As ClaimsPrincipal, properties As AuthenticationProperties) As Task
参数
- context
- HttpContext
上下文 HttpContext 。
- scheme
- String
身份验证方案的名称。
- principal
- ClaimsPrincipal
用户。
- properties
- AuthenticationProperties
返回
任务。