2017-08-22 28 views
0

要在dotnet的核心1.1餅乾管理DataProtection,一個推薦的做法是實現IXmlRepository作爲自定義密鑰存儲提供商和有線它在Startup.cs如下:實現自定義密鑰存儲庫中的dotnet核2.0

services.AddSingleton<IXmlRepository>(new MyCustomXmlRepository()); 

升級到dotnet核心2.0後,GetAllElements()不再在我的存儲庫上調用,並且HttpContext.User.Identity.IsAuthenticated始終爲false。

文檔總是含糊不清(https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers),但仍然暗示該方法仍然有效。

我缺少什麼?

回答

相關問題