public IISPlatformHandlerMiddleware(RequestDelegate next, IISPlatformHandlerOptions options) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } _next = next; _options = options; }
/// <summary> /// Adds middleware for interacting with the IIS HttpPlatformHandler reverse proxy module. /// This will handle forwarded Windows Authentication, request scheme, remote IPs, etc.. /// </summary> /// <param name="builder"></param> /// <returns></returns> public static IApplicationBuilder UseIISPlatformHandler(this IApplicationBuilder app, IISPlatformHandlerOptions options) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } return app.UseMiddleware<IISPlatformHandlerMiddleware>(options); }
/// <summary> /// Adds middleware for interacting with the IIS HttpPlatformHandler reverse proxy module. /// This will handle forwarded Windows Authentication, request scheme, remote IPs, etc.. /// </summary> /// <param name="builder"></param> /// <returns></returns> public static IApplicationBuilder UseIISPlatformHandler(this IApplicationBuilder app, Action<IISPlatformHandlerOptions> configureOptions) { if (app == null) { throw new ArgumentNullException(nameof(app)); } var options = new IISPlatformHandlerOptions(); if (configureOptions != null) { configureOptions(options); } return app.UseIISPlatformHandler(options); }
internal AuthenticationHandler(HttpContext httpContext, IISPlatformHandlerOptions options, ClaimsPrincipal user) { HttpContext = httpContext; User = user; Options = options; }