Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Reacting to DataProtection changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JunTaoLuo committed Mar 16, 2016
1 parent 1a8d531 commit 22f55d5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async Task AspNetCoreWithInteropCookieContainsIdentity()
var identity = new ClaimsIdentity("Cookies");
identity.AddClaim(new Claim(ClaimTypes.Name, "Alice"));

var dataProtection = new DataProtectionProvider(new DirectoryInfo("..\\..\\artifacts"));
var dataProtection = DataProtectionProvider.Create(new DirectoryInfo("..\\..\\artifacts"));
var dataProtector = dataProtection.CreateProtector(
"Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET Core type
CookieAuthenticationDefaults.AuthenticationType, "v2");
Expand Down Expand Up @@ -85,7 +85,7 @@ public async Task InteropWithNewCookieContainsIdentity()
identity.AddClaim(new Claim(ClaimTypes.Name, "Alice"));
user.AddIdentity(identity);

var dataProtection = new DataProtectionProvider(new DirectoryInfo("..\\..\\artifacts"));
var dataProtection = DataProtectionProvider.Create(new DirectoryInfo("..\\..\\artifacts"));
var dataProtector = dataProtection.CreateProtector(
"Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET Core type
CookieAuthenticationDefaults.AuthenticationType, "v2");
Expand Down

0 comments on commit 22f55d5

Please sign in to comment.