Share via


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
System_CAPS_pubmethod RequiresAuthorizationAttribute(AuthorizationLevel)

Initialize a new instance of the RequiresAuthorizationAttribute with a given level.

Properties

Name Description
System_CAPS_pubproperty AllowMultiple

(Inherited from FilterAttribute.)

System_CAPS_pubproperty TypeId

(Inherited from Attribute.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod IsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethod Match(Object)

(Inherited from Attribute.)

System_CAPS_pubmethod OnAuthorization(HttpActionContext)

(Inherited from AuthorizationFilterAttribute.)

System_CAPS_pubmethod OnAuthorizationAsync(HttpActionContext, CancellationToken)

(Inherited from AuthorizationFilterAttribute.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfoCount(UInt32)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod 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