Esempio n. 1
0
        public void Configuration(IAppBuilder app)
        {
            var options = new HttpBasicAuthenticationOptions();
            options.AuthenticationMode = AuthenticationMode.Active;

            options.ValidateCredentials = (user, pwd) =>
            {
                if (user == "max" && pwd == "geheim") return true;
                return false;
            };

            app.UseHttpBasicAuthentication(options);
        }