5.4.3.4 User Registration API

Under the both Key Trust Mode and Public Key Upload Mode, when a participant joins, a Fabric DApp needs to create user transaction key certificates for the sub-users of his/her off-BSN system. The off-BSN system should invoke the User Registration API to register the sub-users on the PCN first. A sub-user’s username is name@appCode in the call parameters

1. Interface address:

https://PCNGatewayAddress/api/fabric/v1/user/register

2. Call Method: POST

3. Signature Algorithm: required and refer to Section 5.4.3.1

4. Call parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map N
3 signature value mac String Y
Header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y
Body
1 user name name String Y Length<20
2 user password secret String N For Key Trust Mode DApps, this can be blank; for public key upload mode DApp, if this is blank then return with a random password

Example:

{"header":{"userCode":"USER0001202004151958010871292","appCode":"app0001202004161020152918451","tId":""},"mac":"MEUCIQDCa3T1c8Fim3LFVfgvelllC/wKWtFnyOl5FK7FXgddFwIgGHXApypixu9RpkHl13z80ZYdVeyRObX7icU3XWk2+VI=","body":{"name":"user01","secret":"123456"}}

5. Response parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
Header
1 Response ID code int Y 0: successful -1: failed
2 Response Message msg String Y
Body
1 user name name String Y Length<20
2 user password secret String Y For public key upload mode DApps, if the call parameter password is blank then return with a random password

Example:

{
  "header": {
    "code": 0,
    "msg": "Transaction Successful"
  },
  "mac": "MEUCIQClfufMU8kRI1gMHIGqfWOh1iv2KIhS+H0dlUUdEuUrLQIgYJz98xp5w/KdVP6bJjHhV2pZPTe9Cn4xcOrPV4E7ZsA=",
  "body": {
    "name": "user01",
    "secret": "123456"
  }
}
© 2019-2020 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2021-01-22 11:14:51

results matching ""

    No results matching ""

    results matching ""

      No results matching ""