我为 Web api 2 创建了自定义属性。我继承自 Authorize 属性。新属性采用 params 属性,例如 public MyAuthorizeAttribute(params string[] scopes){}
和用法将类似于 MyAuthorizeAttribute("Test1","Test2")。我如何将 Test1 和 Test2 访问到 受保护的覆盖 bool IsAuthorized(HttpActionContext actionContext){}
谢谢
我为 Web api 2 创建了自定义属性。我继承自 Authorize 属性。新属性采用 params 属性,例如 public MyAuthorizeAttribute(params string[] scopes){}
和用法将类似于 MyAuthorizeAttribute("Test1","Test2")。我如何将 Test1 和 Test2 访问到 受保护的覆盖 bool IsAuthorized(HttpActionContext actionContext){}
谢谢