View Source
Class AdminTokenAuthorizeAttribute
Used for authorizing scheduled tasks
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public sealed class AdminTokenAuthorizeAttribute : AuthorizeAttribute
Constructors
View Source
AdminTokenAuthorizeAttribute()
Declaration
public AdminTokenAuthorizeAttribute()
View Source
AdminTokenAuthorizeAttribute(IUserService, IRuntimeState)
THIS SHOULD BE ONLY USED FOR UNIT TESTS
Declaration
public AdminTokenAuthorizeAttribute(IUserService userService, IRuntimeState runtimeState)
Parameters
Fields
View Source
AuthorizationType
Declaration
public const string AuthorizationType = "AToken"
Field Value
Type |
Description |
System.String |
|
Methods
View Source
AuthorizeCore(HttpContextBase)
Ensures that the user must be in the Administrator or the Install role
Declaration
protected override bool AuthorizeCore(HttpContextBase httpContext)
Parameters
Type |
Name |
Description |
System.Web.HttpContextBase |
httpContext |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Declaration
public static AuthenticationHeaderValue GetAuthenticationHeaderValue(IUserService userService)
Parameters
Returns
Type |
Description |
AuthenticationHeaderValue |
|
View Source
Used to return the full value that needs to go in the Authorization header
Declaration
public static string GetAuthHeaderTokenVal(IUserService userService)
Parameters
Returns
Type |
Description |
System.String |
|