Permalink
Browse files

Configured AntiForgery to use the correct unique claim type

  • Loading branch information...
robdmoore committed Jun 28, 2014
1 parent b531568 commit 992acae2f9c87bd70c5a8ab3c18c712fc6986893
@@ -0,0 +1,13 @@
using System.IdentityModel.Claims;
using System.Web.Helpers;
namespace AzureAdMvcExample
{
public static class IdentityConfig
{
public static void ConfigureIdentity()
{
AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.Name;
}
}
}
@@ -137,6 +137,7 @@
<ItemGroup>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\IdentityConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\Startup.cs" />
<Compile Include="Controllers\HomeController.cs" />
@@ -13,6 +13,7 @@ protected void Application_Start()
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
GlobalFilters.Filters.Add(new AuthorizeAttribute());
IdentityConfig.ConfigureIdentity();
}
}
}

0 comments on commit 992acae

Please sign in to comment.