SignInManager<TUser> 构造函数

定义

重载

SignInManager<TUser>(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>)

创建 SignInManager<TUser> 的新实例。

SignInManager<TUser>(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider)

创建 SignInManager<TUser> 的新实例。

SignInManager<TUser>(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>)

创建 SignInManager<TUser> 的新实例。

SignInManager<TUser>(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>)

创建 SignInManager<TUser> 的新实例。

public:
 SignInManager(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ userManager, Microsoft::AspNetCore::Http::IHttpContextAccessor ^ contextAccessor, Microsoft::AspNetCore::Identity::IUserClaimsPrincipalFactory<TUser> ^ claimsFactory, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::IdentityOptions ^> ^ optionsAccessor, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Identity::SignInManager<TUser> ^> ^ logger);
public SignInManager (Microsoft.AspNetCore.Identity.UserManager<TUser> userManager, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor, Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> claimsFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.IdentityOptions> optionsAccessor, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser>> logger);
new Microsoft.AspNetCore.Identity.SignInManager<'User (requires 'User : null)> : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * Microsoft.AspNetCore.Http.IHttpContextAccessor * Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<'User (requires 'User : null)> * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.IdentityOptions> * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<'User>> -> Microsoft.AspNetCore.Identity.SignInManager<'User (requires 'User : null)>
Public Sub New (userManager As UserManager(Of TUser), contextAccessor As IHttpContextAccessor, claimsFactory As IUserClaimsPrincipalFactory(Of TUser), optionsAccessor As IOptions(Of IdentityOptions), logger As ILogger(Of SignInManager(Of TUser)))

参数

userManager
UserManager<TUser>

用于从中检索用户并保留用户的 实例 UserManager

contextAccessor
IHttpContextAccessor

用于访问 的 HttpContext访问器。

claimsFactory
IUserClaimsPrincipalFactory<TUser>

用于为用户创建声明主体的工厂。

optionsAccessor
IOptions<IdentityOptions>

用于访问 的 IdentityOptions访问器。

logger
ILogger<SignInManager<TUser>>

用于记录消息、警告和错误的记录器。

适用于

SignInManager<TUser>(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider)

Source:
SignInManager.cs
Source:
SignInManager.cs

创建 SignInManager<TUser> 的新实例。

public:
 SignInManager(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ userManager, Microsoft::AspNetCore::Http::IHttpContextAccessor ^ contextAccessor, Microsoft::AspNetCore::Identity::IUserClaimsPrincipalFactory<TUser> ^ claimsFactory, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Identity::IdentityOptions ^> ^ optionsAccessor, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Identity::SignInManager<TUser> ^> ^ logger, Microsoft::AspNetCore::Authentication::IAuthenticationSchemeProvider ^ schemes);
public SignInManager (Microsoft.AspNetCore.Identity.UserManager<TUser> userManager, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor, Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> claimsFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> optionsAccessor, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser>> logger, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes);
new Microsoft.AspNetCore.Identity.SignInManager<'User (requires 'User : null)> : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * Microsoft.AspNetCore.Http.IHttpContextAccessor * Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<'User (requires 'User : null)> * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<'User>> * Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider -> Microsoft.AspNetCore.Identity.SignInManager<'User (requires 'User : null)>
Public Sub New (userManager As UserManager(Of TUser), contextAccessor As IHttpContextAccessor, claimsFactory As IUserClaimsPrincipalFactory(Of TUser), optionsAccessor As IOptions(Of IdentityOptions), logger As ILogger(Of SignInManager(Of TUser)), schemes As IAuthenticationSchemeProvider)

参数

userManager
UserManager<TUser>

用于从中检索用户并保留用户的 实例 UserManager

contextAccessor
IHttpContextAccessor

用于访问 的 HttpContext访问器。

claimsFactory
IUserClaimsPrincipalFactory<TUser>

用于为用户创建声明主体的工厂。

optionsAccessor
IOptions<IdentityOptions>

用于访问 的 IdentityOptions访问器。

logger
ILogger<SignInManager<TUser>>

用于记录消息、警告和错误的记录器。

schemes
IAuthenticationSchemeProvider

所使用的方案提供程序枚举身份验证方案。

适用于

SignInManager<TUser>(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>)

Source:
SignInManager.cs

创建 SignInManager<TUser> 的新实例。

public:
 SignInManager(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ userManager, Microsoft::AspNetCore::Http::IHttpContextAccessor ^ contextAccessor, Microsoft::AspNetCore::Identity::IUserClaimsPrincipalFactory<TUser> ^ claimsFactory, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Identity::IdentityOptions ^> ^ optionsAccessor, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Identity::SignInManager<TUser> ^> ^ logger, Microsoft::AspNetCore::Authentication::IAuthenticationSchemeProvider ^ schemes, Microsoft::AspNetCore::Identity::IUserConfirmation<TUser> ^ confirmation);
public SignInManager (Microsoft.AspNetCore.Identity.UserManager<TUser> userManager, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor, Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> claimsFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> optionsAccessor, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser>> logger, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes, Microsoft.AspNetCore.Identity.IUserConfirmation<TUser> confirmation);
new Microsoft.AspNetCore.Identity.SignInManager<'User (requires 'User : null)> : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * Microsoft.AspNetCore.Http.IHttpContextAccessor * Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<'User (requires 'User : null)> * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<'User>> * Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider * Microsoft.AspNetCore.Identity.IUserConfirmation<'User (requires 'User : null)> -> Microsoft.AspNetCore.Identity.SignInManager<'User (requires 'User : null)>
Public Sub New (userManager As UserManager(Of TUser), contextAccessor As IHttpContextAccessor, claimsFactory As IUserClaimsPrincipalFactory(Of TUser), optionsAccessor As IOptions(Of IdentityOptions), logger As ILogger(Of SignInManager(Of TUser)), schemes As IAuthenticationSchemeProvider, confirmation As IUserConfirmation(Of TUser))

参数

userManager
UserManager<TUser>

用于从中检索用户并保留用户的 实例 UserManager

contextAccessor
IHttpContextAccessor

用于访问 的 HttpContext访问器。

claimsFactory
IUserClaimsPrincipalFactory<TUser>

用于为用户创建声明主体的工厂。

optionsAccessor
IOptions<IdentityOptions>

用于访问 的 IdentityOptions访问器。

logger
ILogger<SignInManager<TUser>>

用于记录消息、警告和错误的记录器。

schemes
IAuthenticationSchemeProvider

所使用的方案提供程序枚举身份验证方案。

confirmation
IUserConfirmation<TUser>

使用的 IUserConfirmation<TUser> 检查是否确认用户帐户。

适用于