Azure 函数自定义方法属性

Azure Function Custom Method Properties

我想要像

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

[Authentication]是我的习惯 Authentication 实施 FunctionInvocationFilterAttribute。 如果Authentication失败,我想直接returnIActionResult或者HttpResponse.

我该怎么做?

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