public override async Task Invoke(IOwinContext context) { AuthenticationHandler <TOptions> handler = CreateHandler(); await handler.Initialize(Options, context); if (!await handler.InvokeAsync()) { await Next.Invoke(context); } await handler.TeardownAsync(); }
public override async Task Invoke(OwinRequest request, OwinResponse response) { AuthenticationHandler <TOptions> handler = CreateHandler(); await handler.Initialize(Options, request, response); if (!await handler.Invoke()) { await Next.Invoke(request, response); } await handler.Teardown(); }
public override Task Invoke(IOwinContext context) { AuthenticationHandler <TOptions> handler = CreateHandler(); var initTask = handler.Initialize(Options, context); initTask.Wait(); var handlerTask = handler.InvokeAsync(); handlerTask.Wait(); if (!handlerTask.Result) { Next.Invoke(context).Wait(); } handler.TeardownAsync(); }