Hyperledger Composer - Rest Server Local Passport 策略
Hyperledger Composer - Rest Server Local Passport Strategy
我正在尝试为 Hyperledger Composer Rest Server 实施 本地护照策略。
而不是使用第三方服务来验证用户(官方例子中使用的是GitHubOauthhttps://hyperledger.github.io/composer/integrating/enabling-rest-authentication)
我会直接从本地数据库中检索数据。
有人对实现此目标所采用的体系结构和配置有任何建议吗?
提前致谢。
最好的问候。
Composer 在 http://www.passportjs.org/packages/
支持通行证策略
看到这个 Stack overflow -> How to use passport-local to authenticate in composer rest server 但它 COMPOSER_PROVIDERS
不是 COMPOSER_PROVIDER
fyi。
没试过,但是 COMPOSER_PROVIDERS 的类似方法:
"local": {
"provider": "local",
"module": "passport-local",
"usernameField": "username",
"passwordField": "password",
"authPath": "/auth/local",
"callbackURL":"/auth/local/callback",
"successRedirect": "/",
"failureRedirect": "/",
"setAccessToken": true,
"callbackHTTPMethod": "post"
},
希望这对您有所帮助。
我正在尝试为 Hyperledger Composer Rest Server 实施 本地护照策略。
而不是使用第三方服务来验证用户(官方例子中使用的是GitHubOauthhttps://hyperledger.github.io/composer/integrating/enabling-rest-authentication)
我会直接从本地数据库中检索数据。
有人对实现此目标所采用的体系结构和配置有任何建议吗?
提前致谢。
最好的问候。
Composer 在 http://www.passportjs.org/packages/
支持通行证策略看到这个 Stack overflow -> How to use passport-local to authenticate in composer rest server 但它 COMPOSER_PROVIDERS
不是 COMPOSER_PROVIDER
fyi。
没试过,但是 COMPOSER_PROVIDERS 的类似方法:
"local": {
"provider": "local",
"module": "passport-local",
"usernameField": "username",
"passwordField": "password",
"authPath": "/auth/local",
"callbackURL":"/auth/local/callback",
"successRedirect": "/",
"failureRedirect": "/",
"setAccessToken": true,
"callbackHTTPMethod": "post"
},
希望这对您有所帮助。