Class UmbLoginController
Surface controller that handles member login from the Login snippet.
Namespace: Umbraco.Cms.Web.Website.Controllers
Assembly: Umbraco.Web.Website.dll
Syntax
public class UmbLoginController : SurfaceController, IDiscoverable
Constructors
View SourceUmbLoginController(IUmbracoContextAccessor, IUmbracoDatabaseFactory, ServiceContext, AppCaches, IProfilingLogger, IPublishedUrlProvider, IMemberSignInManager, IMemberManager, ITwoFactorLoginService, IDocumentNavigationQueryService, IPublishedContentStatusFilteringService)
Initializes a new instance of the UmbLoginController class.
Declaration
public UmbLoginController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, IProfilingLogger profilingLogger, IPublishedUrlProvider publishedUrlProvider, IMemberSignInManager signInManager, IMemberManager memberManager, ITwoFactorLoginService twoFactorLoginService, IDocumentNavigationQueryService navigationQueryService, IPublishedContentStatusFilteringService publishedContentStatusFilteringService)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoContextAccessor | umbracoContextAccessor | |
| IUmbracoDatabaseFactory | databaseFactory | |
| ServiceContext | services | |
| AppCaches | appCaches | |
| IProfilingLogger | profilingLogger | |
| IPublishedUrlProvider | publishedUrlProvider | |
| IMemberSignInManager | signInManager | |
| IMemberManager | memberManager | |
| ITwoFactorLoginService | twoFactorLoginService | |
| IDocumentNavigationQueryService | navigationQueryService | |
| IPublishedContentStatusFilteringService | publishedContentStatusFilteringService |
Methods
View SourceHandleLogin(LoginModel)
Handles the login form post.
Declaration
[HttpPost]
[ValidateAntiForgeryToken]
[ValidateUmbracoFormRouteString]
public Task<IActionResult> HandleLogin(LoginModel model)
Parameters
| Type | Name | Description |
|---|---|---|
| LoginModel | model | The posted login model. |
Returns
| Type | Description |
|---|---|
| Task<IActionResult> | A redirect to the specified (or current) page on success; otherwise the current page with validation errors or two-factor provider information populated in Microsoft.AspNetCore.Mvc.Controller.ViewData. |