From 631f5c0229ec4a3f0fe31d8b5bae77c961b099aa Mon Sep 17 00:00:00 2001 From: Sergey Lymar Date: Sat, 18 Feb 2017 13:28:26 +1100 Subject: [PATCH] Update cookie-sharing.md (#2790) * Update cookie-sharing.md Added a tip to suggest to add a dependency for the code to start working. It was not obvious and made me search through source code * removed tip --- .../security/data-protection/compatibility/cookie-sharing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aspnetcore/security/data-protection/compatibility/cookie-sharing.md b/aspnetcore/security/data-protection/compatibility/cookie-sharing.md index 18f4d075d5..830cfc9715 100644 --- a/aspnetcore/security/data-protection/compatibility/cookie-sharing.md +++ b/aspnetcore/security/data-protection/compatibility/cookie-sharing.md @@ -42,6 +42,8 @@ app.UseCookieAuthentication(new CookieAuthenticationOptions DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo(@"c:\shared-auth-ticket-keys\")) }); ``` + +The `DataProtectionProvider` requires the `Microsoft.AspNetCore.DataProtection.Extensions` NuGet package. When used in this manner, the DirectoryInfo should point to a key storage location specifically set aside for authentication cookies. The cookie authentication middleware will use the explicitly provided implementation of the DataProtectionProvider, which is now isolated from the data protection system used by other parts of the application. The application name is ignored (intentionally so, since you're trying to get multiple applications to share payloads).