public static IApplicationBuilder UseWsFedAuthentication( this IApplicationBuilder app, WsFedAuthenticationOptions options) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } return(app.UseMiddleware <WsFedAuthenticationMiddleware>(Options.Create(options))); }
public static IApplicationBuilder UseWsFedAuthentication( this IApplicationBuilder app, Action <WsFedAuthenticationOptions> configureOptions) { if (app == null) { throw new ArgumentNullException(nameof(app)); } var options = new WsFedAuthenticationOptions(); if (configureOptions != null) { configureOptions(options); } return(app.UseWsFedAuthentication(options)); }