Skip to content

Instantly share code, notes, and snippets.

View Drawaes's full-sized avatar

Tim Seaward Drawaes

  • Pltfm Limited
  • London
View GitHub Profile
@Drawaes
Drawaes / AuthenticationMiddleware.cs
Created July 3, 2017 13:54 — forked from aaronhoffman/AuthenticationMiddleware.cs
asp.net core AuthenticationMiddleware Dependency Injection
public class MyAuthenticationMiddleware : AuthenticationMiddleware<MyAuthenticationOptions>
{
public MyAuthenticationMiddleware(
IMyService myService, // inject service here?? (via Startup.ConfigureServices(), services.AddTransient() )
RequestDelegate next,
IOptions<MyAuthenticationOptions> options,
ILoggerFactory loggerFactory,
UrlEncoder encoder)
: base(next, options, loggerFactory, encoder)
{