Update authentication middleware

Update global to sdk 2.0.0
This commit is contained in:
Ramón Tomás 2017-08-23 16:40:28 +02:00
parent 58f3b5b274
commit 4161efdd70
2 changed files with 19 additions and 21 deletions

View File

@ -1,5 +1,5 @@
{
"sdk": {
"version":"2.0.0-preview2-006497"
"version":"2.0.0"
}
}

View File

@ -86,7 +86,11 @@ namespace Microsoft.eShopOnContainers.WebMVC
// Add Authentication services
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
services.AddAuthentication(options => {
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
})
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme)
.AddOpenIdConnect(options => {
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
@ -105,12 +109,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
options.Scope.Add("marketing");
options.Scope.Add("locations");
});
services.AddAuthentication(options => {
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.