我们可以在用户注册时在 hyperledger fabric 中提供自定义密码而不是注册密码吗

Can we provide customise password instead of enrollment secret in hyperledger fabric while user registration

我正在尝试使用 https://github.com/hyperledger/fabric-samples/tree/release-1.4/fabcar/javascript

中提到的 fabric-ca 客户端实现用户注册

因为我们有 registerUser.js 文件,其中的函数用于注册用户,注册用户。在使用下面的函数 fabric ca 生成随机字符的秘密时,但是我需要它作为用户密码,如 password@123.

const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: 'user1', role: 'client' }, adminIdentity);

我们可以实现这个要求吗?

提前致谢

当然可以。只需指定您想要的 enrollmentSecret

https://hyperledger.github.io/fabric-sdk-node/release-1.4/global.html#RegisterRequest