public OpenIdBearerInjectorMiddleware(RequestDelegate next, OpenIdBearerInjectorOptions options) { _next = next ?? throw new ArgumentNullException(nameof(next)); _options = options ?? throw new ArgumentNullException(nameof(options)); if (null == options.OpenIdSettings) { throw new ArgumentNullException(nameof(options.OpenIdSettings)); } }
public static IApplicationBuilder UseOpenIdBearerInjector(this IApplicationBuilder app, OpenIdBearerInjectorOptions options) { if (null == app) { throw new ArgumentNullException(nameof(app)); } if (null == options) { throw new ArgumentNullException(nameof(options)); } return(app.UseMiddleware <OpenIdBearerInjectorMiddleware>(options)); }