【发布时间】:2017-12-27 17:50:32
【问题描述】:
我已经为 Web api 2 创建了自定义属性。我继承自 Authorize 属性。新属性采用 params 属性,例如 public MyAuthorizeAttribute(params string[] scopes){}
和用法将是这样的 MyAuthorizeAttribute("Test1","Test2")。 我如何访问 Test1 和 Test2 到 protected override bool IsAuthorized(HttpActionContext actionContext){}
谢谢
【问题讨论】:
标签: filter authorize-attribute actionfilterattribute webapi2