remet ServerCookie en shéma d'auth

This commit is contained in:
2016-06-06 14:35:48 +02:00
parent da9815145a
commit 26d9cbd9c9

View File

@ -195,7 +195,9 @@ namespace Yavsc
new DirectoryInfo(Configuration["DataProtection:Keys:Dir"]));
});
services.AddAuthentication();
services.AddAuthentication(
op=>op.SignInScheme = "ServerCookie"
);
// Add framework services.
services.AddEntityFramework()
.AddNpgsql()
@ -241,6 +243,7 @@ namespace Yavsc
services.AddAuthorization(options =>
{
options.AddPolicy("AdministratorOnly", policy =>
{
policy.RequireClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role", Constants.AdminGroupName);