2020-12-07 18:47:25 +11:00
|
|
|
using Microsoft.AspNetCore.Authorization;
|
2020-11-20 15:32:36 +11:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2021-02-18 11:06:02 +01:00
|
|
|
using Umbraco.Cms.Web.BackOffice.Filters;
|
|
|
|
|
using Umbraco.Cms.Web.Common.Attributes;
|
|
|
|
|
using Umbraco.Cms.Web.Common.Authorization;
|
|
|
|
|
using Umbraco.Cms.Web.Common.Controllers;
|
|
|
|
|
using Umbraco.Cms.Web.Common.Filters;
|
2020-05-18 06:43:33 +02:00
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
namespace Umbraco.Cms.Web.BackOffice.Controllers
|
2020-05-18 06:43:33 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides a base class for authorized auto-routed Umbraco API controllers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <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.
|
|
|
|
|
/// </remarks>
|
2020-12-07 18:47:25 +11:00
|
|
|
[IsBackOffice]
|
2020-10-12 13:32:25 +02:00
|
|
|
[UmbracoUserTimeoutFilter]
|
2020-11-20 15:32:36 +11:00
|
|
|
[Authorize(Policy = AuthorizationPolicies.BackOfficeAccess)]
|
2020-05-18 06:43:33 +02:00
|
|
|
[DisableBrowserCache]
|
2020-11-26 16:52:03 +11:00
|
|
|
[UmbracoRequireHttps]
|
2020-09-15 10:13:05 +02:00
|
|
|
[CheckIfUserTicketDataIsStale]
|
2020-10-13 09:39:31 +02:00
|
|
|
[MiddlewareFilter(typeof(UnhandledExceptionLoggerFilter))]
|
2020-05-18 06:43:33 +02:00
|
|
|
public abstract class UmbracoAuthorizedApiController : UmbracoApiController
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|