你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

RequiresAuthorizationAttribute 类

定义

注意

Please use the new AuthorizeLevelAttribute class instead.

将此属性应用于 ApiController 对其的操作或控制器访问权限。 根据 AuthorizationLevel 指定的 ,对目标操作的访问将限制为已被授予该级别或更高级别的请求。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
[System.Obsolete("Please use the new AuthorizeLevelAttribute class instead.")]
public sealed class RequiresAuthorizationAttribute : System.Web.Http.AuthorizeLevelAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
[<System.Obsolete("Please use the new AuthorizeLevelAttribute class instead.")>]
type RequiresAuthorizationAttribute = class
    inherit AuthorizeLevelAttribute
Public NotInheritable Class RequiresAuthorizationAttribute
Inherits AuthorizeLevelAttribute
继承
System.Web.Http.AuthorizeLevelAttribute
RequiresAuthorizationAttribute
属性

构造函数

RequiresAuthorizationAttribute(AuthorizationLevel)
已过时.

使用给定 levelRequiresAuthorizationAttribute 初始化 的新实例。

适用于