ASP.NET Core 2.0 Aperçu 1: Comment faire pour configurer l'Authentification par Cookie avec connexion personnalisée chemin

Dans ASP.NET Core 2.0 .UseAuthentication() middleware a une modification importante qui ne permet plus le l'ancienne syntaxe mentionné ici de travail.

La nouvelle version apparaît à traiter avec la config dans addAuthentication, mais je ne peux pas trouver tout les détails de n'importe où sur la façon de changer mon vieux code qui indiquait une coutume de connexion et de déconnexion de l'url.

        services.AddAuthentication(o =>
        {
            //Where can I specify this?????
            var opt = new CookieAuthenticationOptions()
            {
                LoginPath = "/api/login",
                LogoutPath = "/api/logout",
            };

           o.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
           o.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        });

Toute aide serait appréciée...

InformationsquelleAutor Rick Strahl | 2017-05-14