Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackOfficeLoginController

    Provides endpoints for managing back office user authentication and login operations.

    Inheritance
    object
    ControllerBase
    Controller
    Namespace: Umbraco.Cms.Api.Management
    Assembly: Umbraco.Cms.Api.Management.dll
    Syntax
    [ApiExplorerSettings(IgnoreApi = true)]
    [Route("/umbraco/login")]
    public class BackOfficeLoginController : Controller

    Constructors

    View Source

    BackOfficeLoginController(IOptionsSnapshot<GlobalSettings>, IHostingEnvironment)

    Initializes a new instance of the BackOfficeLoginController class.

    Declaration
    public BackOfficeLoginController(IOptionsSnapshot<GlobalSettings> globalSettings, IHostingEnvironment hostingEnvironment)
    Parameters
    Type Name Description
    IOptionsSnapshot<GlobalSettings> globalSettings

    A snapshot of the application's global settings options.

    IHostingEnvironment hostingEnvironment

    The current hosting environment for the application.

    Fields

    View Source

    LoginPath

    Declaration
    public const string LoginPath = "/umbraco/login"
    Field Value
    Type Description
    string

    Methods

    View Source

    Index(CancellationToken, BackOfficeLoginModel)

    Handles the GET request for the back office login page. If the user is already authenticated, updates the model accordingly. Ensures the return URL is a relative path and sets default values if necessary.

    Declaration
    public Task<IActionResult> Index(CancellationToken cancellationToken, BackOfficeLoginModel model)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A cancellation token to cancel the operation.

    BackOfficeLoginModel model

    The model containing login information and the return URL.

    Returns
    Type Description
    Task<IActionResult>

    An Microsoft.AspNetCore.Mvc.IActionResult that renders the login view with the model, or a bad request result if the return URL is invalid.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX