我想要做的是使用 HttpWebRequest 登录到共享点站点(它使用 ADFS 服务器)。我是怎么做的:
- 我已经使用 WSTrustChannelFactory 获得了 SecurityToken(请参阅此处的这篇文章)
- 将 SecurityToken 转换为 FedAuth cookie
- 创建 HttpWebRequest 并附加 FedAuth cookie。
- 发送 HttpWebRequest 请求并接收响应。
PROBLEM : in step 2 I need to convert SecurityToken (which is '_a9e1657d-9360-4578-9075-9a84617a6826') into FedAuth cookie, which should be something like '77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48U1A+MGUudHxsc3QgYWRmc3xldWdlbmlqdXNyQGxzdC5pbnRlcm5hbCwwZS50fGxzdCBhZGZzfGV1Z2VuaWp1c3JAbHN0LmludGVybmFsLDEzMDA0NzA4NzU4MTYzMDAwMCxUcnVlLEswN0FqZWdlTWZTMUpwZWhka3FlOGtQN0I4MUxxL3ZKOS8zM2NtRnk2KzNvQ3M5Sy9pM1dYZmU4SHlxWHdTOGhLRDdLWkgyaG9QcytZNEJBOHkrcnFRR3BVUFQxUGtOaTJqL0EvRHZKOWk0Z0V5Z2ZNT3oyUDlpRER6K2tST2FrQVpybG5xM0hxYTlCVWs4S1JuSGJEUXpyK3h1TDk1SEl4K3dibnJQMlY3cVdDSFBmRXhsc0Ftc2duWjl3c3E3ZVlnL1AxL2FaWFphWWtseFYyQ1ZEdGN3eENLRWpQWnF2TVlRNlo1M3NUZFVvQ3dwRlB6SzIzNnpGeHhZZnIvUXFn'
似乎 cookie 值已加密。如何从令牌字符串创建加密 cookie?有人知道吗?
谢谢你。