Azure函数自定义方法属性

时间:2017-12-27 09:10:22

标签: azure-functions azure-webjobs

我想要像

这样的自定义函数属性
[FunctionName("Function1"),Authentication]
 public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequest req, TraceWriter log)
{
}

[Authentication]是我的习惯 Authentication实施FunctionInvocationFilterAttribute。 如果Authentication失败,我希望直接返回IActionResultHttpResponse

我该怎么做?

1 个答案:

答案 0 :(得分:1)

我认为还不支持从过滤器调用短路函数。请参阅跟踪此类请求的this issue

相关问题