예제 #1
0
        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));
        }
예제 #2
0
        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));
        }