Exemplo n.º 1
0
        /// <summary>
        /// Enable using Ntlm authentication
        /// </summary>
        /// <param name="app"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IAppBuilder UseNtlmAuthentication(this IAppBuilder app, NtlmAuthenticationOptions options = null)
        {
            if (app == null)
            {
                throw new ArgumentNullException("app");
            }

            app.Use(typeof(NtlmAuthenticationMiddleware), app, options != null ? options : new NtlmAuthenticationOptions());
            app.UseStageMarker(PipelineStage.Authenticate);

            return(app);
        }
        /// <summary>
        /// Enable using Ntlm authentication
        /// </summary>
        /// <param name="app"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IAppBuilder UseNtlmAuthentication(this IAppBuilder app, NtlmAuthenticationOptions options = null)
        {
            if (app == null)
            {
                throw new ArgumentNullException("app");
            }

            app.Use(typeof(NtlmAuthenticationMiddleware), app, options != null ? options : new NtlmAuthenticationOptions());
            app.UseStageMarker(PipelineStage.Authenticate);

            return app;
        }