RequiresAuthorizationAttribute Class
Note: This API is now obsolete.
Apply this attribute to ApiController actions or controllers access to them. Based on the AuthorizationLevel specified, access to the target action will be restricted to requests that have been granted that level or higher.
Namespace: Microsoft.WindowsAzure.Mobile.Service.Security
Assembly: Microsoft.WindowsAzure.Mobile.Service (in Microsoft.WindowsAzure.Mobile.Service.dll)
Inheritance Hierarchy
System.Object
System.Attribute
System.Web.Http.Filters.FilterAttribute
System.Web.Http.Filters.AuthorizationFilterAttribute
System.Web.Http.AuthorizeLevelAttribute
Microsoft.WindowsAzure.Mobile.Service.Security.RequiresAuthorizationAttribute
Syntax
[ObsoleteAttribute("Please use the new AuthorizeLevelAttribute class instead.")]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Method,
AllowMultiple = false, Inherited = true)]
public sealed class RequiresAuthorizationAttribute : AuthorizeLevelAttribute
[ObsoleteAttribute("Please use the new AuthorizeLevelAttribute class instead.")]
[AttributeUsageAttribute(AttributeTargets::Class | AttributeTargets::Method,
AllowMultiple = false, Inherited = true)]
public ref class RequiresAuthorizationAttribute sealed : AuthorizeLevelAttribute
[<Sealed>]
[<ObsoleteAttribute("Please use the new AuthorizeLevelAttribute class instead.")>]
[<AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Method,
AllowMultiple = false, Inherited = true)>]
type RequiresAuthorizationAttribute =
class
inherit AuthorizeLevelAttribute
end
<ObsoleteAttribute("Please use the new AuthorizeLevelAttribute class instead.")>
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Method,
AllowMultiple := False, Inherited := True)>
Public NotInheritable Class RequiresAuthorizationAttribute
Inherits AuthorizeLevelAttribute
Constructors
Name | Description | |
---|---|---|
![]() |
RequiresAuthorizationAttribute(AuthorizationLevel) | Initialize a new instance of the RequiresAuthorizationAttribute with a given level. |
Properties
Name | Description | |
---|---|---|
![]() |
AllowMultiple | (Inherited from FilterAttribute.) |
![]() |
TypeId | (Inherited from Attribute.) |
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | (Inherited from Attribute.) |
![]() |
GetHashCode() | (Inherited from Attribute.) |
![]() |
GetType() | (Inherited from Object.) |
![]() |
IsDefaultAttribute() | (Inherited from Attribute.) |
![]() |
Match(Object) | (Inherited from Attribute.) |
![]() |
OnAuthorization(HttpActionContext) | (Inherited from AuthorizationFilterAttribute.) |
![]() |
OnAuthorizationAsync(HttpActionContext, CancellationToken) | (Inherited from AuthorizationFilterAttribute.) |
![]() |
ToString() | (Inherited from Object.) |
Explicit Interface Implementations
Name | Description | |
---|---|---|
![]() ![]() |
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() |
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() |
_Attribute.GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() |
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
![]() ![]() |
IAuthorizationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext, CancellationToken, Func<Task<HttpResponseMessage>>) | (Inherited from AuthorizationFilterAttribute.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.WindowsAzure.Mobile.Service.Security Namespace
Return to top