adfs - Wsfedsaml2 - 解密密钥
问题描述
我正在尝试使用此 api:https ://github.com/auth0/passport-wsfed-saml2在我的应用程序中实现 SSO。我已经在虚拟框中配置了 ADFS 服务。
当我尝试登录时,它会给出以下消息:断言已加密。请使用您的解密私钥设置 options.decryptionKey。
我在哪里可以得到这个解密密钥?我有点失落。
提前致谢。
解决方案
据我了解,您必须将私钥副本保存在代码库中或从某个环境变量中读取。在你的代码中
passport.use('wsfed-saml2', new wsfedsaml2({
protocol: "samlp",
// This is the private key (use case where ADFS
// is configured for RP token encryption)
decryptionKey: fs.readFileSync("your+key+path+privateKey")
}, function (profile, done) {
// ...
}));
希望这可以帮助
推荐阅读
- c++ - 读取系统内存的权限不足
- python-3.x - 使用 Requests-HTML 仅从父标签中提取文本
- c - 在 cygwin 中运行程序时,意外标记 `(' 附近出现语法错误
- reactjs - Is there anyway to dynamically add a child to a JSX element?
- debugging - Intellij: how to open a library java source and set a breakpoint for debugging?
- java - How to make IntelliJ color preview recognize a custom Color class?
- c# - How to return value of items in Listbox to Textbox
- excel - 如何格式化此 VBA 电子邮件
- python - Python DataFrame 选择行 3 年
- python - urllib3 和 curl 不适用于某些网站,但浏览器可以使用