Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试结合一些东西。我正在使用此处提出的想法,以便我可以利用索赔,而不必拥有 STS。我也在尝试创建我自己的令牌缓存,记录在这里,以便在网络场中工作。我还在组合中包含了新的 MachineKeySessionSecurityTokenHandler 以及此处的文档。我的问题是,当我登录时,一个令牌似乎被创建和缓存,甚至成功地从缓存中提取,但它似乎没有设置线程上下文。因此,用户不会从登录页面重定向,因为没有设置 ClaimsPrincipal。如果我使用默认令牌缓存,一切正常。有什么建议么?
我想到了。我在我使用的 IFormatter 上指定了更多选项。具体来说,
TypeFormat = FormatterTypeStyle.TypesAlways, AssemblyFormat = FormatterAssemblyStyle.Full