Class LoginModel
Inheritance
System.Object
LoginModel
Assembly: Volo.Abp.Account.Web.dll
Syntax
public class LoginModel : AccountPageModel
Constructors
LoginModel(IAuthenticationSchemeProvider, IOptions<AbpAccountOptions>)
Declaration
public LoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions<AbpAccountOptions> accountOptions)
Parameters
| Type |
Name |
Description |
| Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider |
schemeProvider |
|
| Microsoft.Extensions.Options.IOptions<AbpAccountOptions> |
accountOptions |
|
Properties
AccountOptions
Declaration
protected AbpAccountOptions AccountOptions { get; }
Property Value
EnableLocalLogin
Declaration
public bool EnableLocalLogin { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
ExternalLoginScheme
Declaration
public string ExternalLoginScheme { get; }
Property Value
| Type |
Description |
| System.String |
|
ExternalProviders
Declaration
public IEnumerable<LoginModel.ExternalProviderModel> ExternalProviders { get; set; }
Property Value
IsExternalLoginOnly
Declaration
public bool IsExternalLoginOnly { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
LoginInput
Declaration
[BindProperty]
public LoginModel.LoginInputModel LoginInput { get; set; }
Property Value
ReturnUrl
Declaration
[HiddenInput]
[BindProperty(SupportsGet = true)]
public string ReturnUrl { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ReturnUrlHash
Declaration
[HiddenInput]
[BindProperty(SupportsGet = true)]
public string ReturnUrlHash { get; set; }
Property Value
| Type |
Description |
| System.String |
|
SchemeProvider
Declaration
protected IAuthenticationSchemeProvider SchemeProvider { get; }
Property Value
| Type |
Description |
| Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider |
|
ShowCancelButton
Declaration
public bool ShowCancelButton { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
VisibleExternalProviders
Declaration
public IEnumerable<LoginModel.ExternalProviderModel> VisibleExternalProviders { get; }
Property Value
Methods
CheckLocalLoginAsync()
Declaration
protected virtual Task CheckLocalLoginAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CreateExternalUserAsync(ExternalLoginInfo)
Declaration
protected virtual Task<IdentityUser> CreateExternalUserAsync(ExternalLoginInfo info)
Parameters
| Type |
Name |
Description |
| Microsoft.AspNetCore.Identity.ExternalLoginInfo |
info |
|
Returns
GetExternalProviders()
Declaration
protected virtual Task<List<LoginModel.ExternalProviderModel>> GetExternalProviders()
Returns
OnGetAsync()
Declaration
public virtual Task<IActionResult> OnGetAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> |
|
OnGetExternalLoginCallbackAsync(String, String, String)
Declaration
public virtual Task<IActionResult> OnGetExternalLoginCallbackAsync(string returnUrl = "", string returnUrlHash = "", string remoteError = null)
Parameters
| Type |
Name |
Description |
| System.String |
returnUrl |
|
| System.String |
returnUrlHash |
|
| System.String |
remoteError |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> |
|
OnPostAsync(String)
Declaration
public virtual Task<IActionResult> OnPostAsync(string action)
Parameters
| Type |
Name |
Description |
| System.String |
action |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> |
|
OnPostExternalLogin(String)
Declaration
public virtual Task<IActionResult> OnPostExternalLogin(string provider)
Parameters
| Type |
Name |
Description |
| System.String |
provider |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> |
|
ReplaceEmailToUsernameOfInputIfNeeds()
Declaration
protected virtual Task ReplaceEmailToUsernameOfInputIfNeeds()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
TwoFactorLoginResultAsync()
Override this method to add 2FA for your application.
Declaration
protected virtual Task<IActionResult> TwoFactorLoginResultAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> |
|
Extension Methods