我有一个使用联合身份验证的ASP.NET身份服务器应用程序。现在,我们正在开发.Net Core 2.2 Web应用程序以与身份服务器集成。但是有些问题我们无法解决。 我无法在安全的Cookie中获得ClaimsIdentity。我尝试使用System.Security.Cryptography.Xml解密,但无法成功。如何解密Cookie并达到令牌中的要求?
Cookie示例:
<?xml version="1.0" encoding="utf-8"?>
<SecurityContextToken p1:Id="_208ff796-8c41-430a-b001-4b40eb162c83-72BB0DCC1AA7D75C50AA3B080D5BFE99"
xmlns:p1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512">
<Identifier>urn:uuid:c735123c-5570-49e8-a49d-8f3ce91a6aa9</Identifier>
<Cookie
xmlns="http://schemas.microsoft.com/ws/2006/05/security">/rWn+6CjnbOVsP0ufhxBisM8+TuH6DAJkv/fdORAtH+9B0TnOrs7BW1qDWV+mVngT7p5DtekQcEtflGcPY7iRCnKUpwKDOhlXF9O2SH2rmluf1j2xCVnS3k1ovsEQzBDcy3wO+ciIYglp+uxry0qCTCXy7PIO62/+8AUvNjwUEvDjsEtpWe5mEGktvaY9VoTON9lwGaC5+CdYzcApUiGF0Z2r3T5Bhr2bwhs4ZGpteYP20+dkjsmawyQHfxR7m28J7f7x1A+3SkjkAS3VDCO49MmStdNQKKIIHCkvIWxW7+ciDY8Q4sze8FvAtlAfq6V9gT0qoPA8jJLcD3rH9yK9G1JI1s023/r1mbNT+uFdWVVXFmQQSNObF+CEVX5HhPdNGgvwgpekdE8IEg9QaaODXlh124XyrdfwxNJdktK2X9vUXuLM88983EBzbKxaGlxbCBI9U/4ogCkhFEppy+IbwABRHauknISa30QssH3UJW0YkTw/krcQ8KX8z3MYRPNPb6ito7hmwBFmiepEK7pjalPd3Yhl24a3Pjhki9+lqCKmFx6Y+MDl6Qgdva1Sz16spRbgk1ta0lUoilFlPM6fo5lVcsP2TIIYcoR92hNJvj3H6enU66Ii0U1jW0BNDS1iK0n7ROaYLQPNPAEsozK/VqsnAE9HEgKuBUHd0nE0xpdSuvxMek1ewH4pb9Vc9Uiyqg7K9JU8rqkZXQP1OFOOFViVPN/0luSVszktSF677zPwtvVfr2aG6HApu9NUKqSQTdUI4UJczfnaoAyPGjTKGKbvHp7BUTc3+Bfocy1clj7IZfO0PNlQT/XIIdsp4KdiVWgvKVqNYqcE2MlBM3fSmgP72Vn1Mh/pNRPQEyyENGLgTYcvl7E1LcEILlYmECSXEu24vhFukmjPn6pK2iiMvLOUd0IB3JZXWA4/75/6HdJ7KE/52h2c/E9J1pnThXXRVBVc7a9t7pY9ZkTuV4ni2r9BH0CpJo5yv/qwVnjXV9LcSCTzT4IhtatepO4x1NVgSHm0w==
</Cookie>
</SecurityContextToken>
谢谢