gpt4 book ai didi

passport.js - Hyperledger Composer - Rest Server Local Passport 策略

转载 作者:行者123 更新时间:2023-12-01 13:22:25 26 4
gpt4 key购买 nike

我正在尝试为 Hyperledger Composer Rest Server 实现 Local Passport Strategy
而不是使用第三方服务来验证用户(在官方示例中使用 GitHub Oauth https://hyperledger.github.io/composer/integrating/enabling-rest-authentication )我会直接从本地数据库中检索数据。
有没有人对为实现这一目标而采用的架构和配置有任何建议?

提前致谢。
最好的问候。

最佳答案

Composer 在 http://www.passportjs.org/packages/ 支持 Passport 策略

查看此 Stack overflow -> How to use passport-local to authenticate in composer rest server但它的 COMPOSER_PROVIDERS 不是 COMPOSER_PROVIDER fyi。

没有试过这个但是对于 COMPOSER_PROVIDERS 是这样的:


“本地的”: {
“提供者”:“本地”,
“模块”:“本地 Passport ”,
"用户名字段": "用户名",
"密码字段": "密码",
"authPath": "/auth/local",
"callbackURL":"/auth/local/callback",
“成功重定向”:“/”,
“失败重定向”:“/”,
“setAccessToken”:真实的,
“callbackHTTPMethod”:“发布”
},

希望这对您有所帮助。

关于passport.js - Hyperledger Composer - Rest Server Local Passport 策略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49409675/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com