public static IApplicationBuilder UseBasicMiddleware(this IApplicationBuilder builder, BasicUser user) { if (user == null) { throw new ArgumentException("Need to set up Basic user"); } return(builder.UseMiddleware <BasicMiddleware>(user)); }
public BasicMiddleware(RequestDelegate next, BasicUser user) { _next = next; _user = user; }