using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; namespace AuthStudy.Authentication.Browser { public static class BrowserAuthenticationExtensions { public static AuthenticationBuilder AddBrowser(this AuthenticationBuilder builder) { return builder.AddBrowser(BrowserAuthenticationDefault.SchemeName); } public static AuthenticationBuilder AddBrowser(this AuthenticationBuilder builder, string authenticationScheme) { return builder.AddBrowser(authenticationScheme, configureOptions: null); } public static AuthenticationBuilder AddBrowser(this AuthenticationBuilder builder, Action configureOptions) { return builder.AddBrowser(BrowserAuthenticationDefault.SchemeName, configureOptions); } public static AuthenticationBuilder AddBrowser ( this AuthenticationBuilder builder, string authenticationScheme, Action configureOptions ) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } return builder; //return builder.AddScheme>(authenticationScheme, "", configureOptions); } } }