Class UmbracoAuthorizedApiController
A base controller that ensures all requests are authorized - the user is logged in.
Inheritance
System.Object
System.Web.Http.ApiController
Namespace:System.Dynamic.ExpandoObject
Assembly:umbraco.dll
Syntax
[UmbracoAuthorize]
public abstract class UmbracoAuthorizedApiController : UmbracoApiController, IHttpController, IDisposable, IDiscoverable
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.
Constructors
UmbracoAuthorizedApiController()
Declaration
protected UmbracoAuthorizedApiController()
UmbracoAuthorizedApiController(UmbracoContext)
Declaration
protected UmbracoAuthorizedApiController(UmbracoContext umbracoContext)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext |
UmbracoAuthorizedApiController(UmbracoContext, UmbracoHelper)
Declaration
protected UmbracoAuthorizedApiController(UmbracoContext umbracoContext, UmbracoHelper umbracoHelper)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | |
UmbracoHelper | umbracoHelper |
UmbracoAuthorizedApiController(UmbracoContext, UmbracoHelper, BackOfficeUserManager<BackOfficeIdentityUser>)
Declaration
protected UmbracoAuthorizedApiController(UmbracoContext umbracoContext, UmbracoHelper umbracoHelper, BackOfficeUserManager<BackOfficeIdentityUser> backOfficeUserManager)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | |
UmbracoHelper | umbracoHelper | |
BackOfficeUserManager<BackOfficeIdentityUser> | backOfficeUserManager |
Properties
UmbracoUser
Returns the currently logged in Umbraco User
Declaration
[Obsolete("This should no longer be used since it returns the legacy user object, use The Security.CurrentUser instead to return the proper user object, or Security.GetUserId() if you want to just get the user id")]
protected User UmbracoUser { get; }
Property Value
Type | Description |
---|---|
umbraco.BusinessLogic.User |
UserManager
Declaration
protected BackOfficeUserManager<BackOfficeIdentityUser> UserManager { get; }
Property Value
Type | Description |
---|---|
BackOfficeUserManager<BackOfficeIdentityUser> |