我想要自定义函数属性
[FunctionName("Function1"),Authentication]
public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequest req, TraceWriter log)
{
}
[Authentication]
是我的定制Authentication
实施FunctionInvocationFilterAttribute
。如果Authentication
失败,我想直接返回IActionResult
或HttpResponse
。
我该怎么做呢?
我认为还不支持从过滤器调用短路函数。请参阅跟踪此类请求的this issue。