starter-kitなどの開発環境でのログインの方法
ユーザ登録
cd $GOPATH/src/github.com/hyperledger/fabric/peer
peer network login
パスワードには、membersrvc.yaml内のeca.usersセクションのユーザのenrollmentPWを使う
eca:
# This hierarchy is used to create the Pre-key tree, affiliations is the
top of this hierarchy, 'banks_and_institutions' is used to create the key assoc
iated to auditors of both banks and
admin: 1 PassWord institution_a '{"registrar":{"roles":["client","peer","validator","auditor"],"delegateRoles":["client"]}}'
WebAppAdmin: 1 PassWord institution_a '{"registrar":{"roles":["client"]}}'
REST APIでログインするには /registrar のエンドポイントにPOSTリクエストを投げる
REST Request:
POST localhost:7050/registrar
{
"enrollId": "jim",
"enrollSecret": "6avZQLwcUe9b"
}
REST Response:
200 OK
{
"OK": "Login successful for user 'jim'."
}