From 9e68b4306917cf0f88594dba99189c3e872b01d2 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Fri, 16 Jan 2015 10:05:53 -0800 Subject: [PATCH] Adding authorization policy for the missed startup class. --- .../E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs b/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs index a6abe4c1cf..ad129ea8dc 100644 --- a/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs +++ b/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs @@ -7,6 +7,7 @@ using Microsoft.AspNet.Diagnostics.Entity; using Microsoft.AspNet.Http; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Routing; +using Microsoft.AspNet.Security; using Microsoft.AspNet.Security.Facebook; using Microsoft.AspNet.Security.Google; using Microsoft.AspNet.Security.MicrosoftAccount; @@ -109,6 +110,12 @@ namespace MusicStore //Add InMemoryCache services.AddSingleton(); + + // Configure Auth + services.Configure(options => + { + options.AddPolicy("ManageStore", new AuthorizationPolicyBuilder().RequiresClaim("Allowed").Build()); + }); }); //To gracefully shutdown the server - Not for production scenarios