Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoAuthorizedApiController

    Provides a base class for authorized auto-routed Umbraco API controllers.

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [AngularJsonOnlyConfiguration]
    [JsonExceptionFilter]
    [UmbracoUserTimeoutFilter]
    [Authorize(Policy = "BackOfficeAccess")]
    [MiddlewareFilter(typeof(UnhandledExceptionLoggerFilter))]
    public abstract class UmbracoAuthorizedApiController : UmbracoApiController
    Remarks

    This controller will also append a custom header to the response if the user is logged in using forms authentication which indicates the seconds remaining before their timeout expires.

    Methods

    View Source

    GetValidationProblemDetails(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

    Declaration
    protected ValidationProblemDetails GetValidationProblemDetails(string detail = null, string instance = null, int? statusCode = null, string title = null, string type = null, [ActionResultObjectValue] ModelStateDictionary modelStateDictionary = null)
    Parameters
    Type Name Description
    System.String detail
    System.String instance
    System.Nullable<System.Int32> statusCode
    System.String title
    System.String type
    Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ValidationProblemDetails
    View Source

    ValidationProblem(ModelStateDictionary)

    Overridden to return Umbraco compatible errors

    Declaration
    [NonAction]
    public override ActionResult ValidationProblem(ModelStateDictionary modelStateDictionary)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult
    View Source

    ValidationProblem(Nullable<IErrorModel>, ModelStateDictionary, Int32)

    Returns a validation problem result for the and the Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary

    Declaration
    protected virtual ActionResult ValidationProblem(IErrorModel? model, ModelStateDictionary modelStateDictionary, int statusCode = 400)
    Parameters
    Type Name Description
    System.Nullable<IErrorModel> model
    Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary
    System.Int32 statusCode
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult
    View Source

    ValidationProblem(Nullable<INotificationModel>, Int32)

    Returns an Umbraco compatible validation problem for the given notification model

    Declaration
    protected virtual ActionResult ValidationProblem(INotificationModel? model, int statusCode = 400)
    Parameters
    Type Name Description
    System.Nullable<INotificationModel> model
    System.Int32 statusCode
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult
    View Source

    ValidationProblem(Object, Int32)

    Returns an Umbraco compatible validation problem for the object result

    Declaration
    protected virtual ActionResult ValidationProblem(object value, int statusCode)
    Parameters
    Type Name Description
    System.Object value
    System.Int32 statusCode
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult
    View Source

    ValidationProblem(String)

    Returns an Umbraco compatible validation problem for the given error message

    Declaration
    protected virtual ActionResult ValidationProblem(string errorMessage)
    Parameters
    Type Name Description
    System.String errorMessage
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetValidationProblemDetails(String, String, Nullable<Int32>, String, String, ModelStateDictionary)
      • ValidationProblem(ModelStateDictionary)
      • ValidationProblem(Nullable<IErrorModel>, ModelStateDictionary, Int32)
      • ValidationProblem(Nullable<INotificationModel>, Int32)
      • ValidationProblem(Object, Int32)
      • ValidationProblem(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX