5.4.3.4 User Registration API

In both Key Trust Mode and Public Key Upload Mode, when a user participated in a Fabric DApp wants to create a unique user transaction key certificate for a sub-user of the off-chain 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 request 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
3 extended properties extendProperties String N User extended properties, json format string

Example:

{"header":{"userCode":"USER0001202101301022113596689","appCode":"app0001202109171125562435760","tId":""},"mac":"MEQCID3F4z2XpN4JsCU/gRO9l0Ziw1IOICx8eVgVWUVltvWyAiA1Y0uObgCV5tm1avSz9BscYr1aycmfBtFSlQ3o19OYEQ==","body":{"name":"user20210927","secret":"123456","extendProperties":"{'key1':'value'}"}}

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-2024 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2023-02-16 12:22:00

results matching ""

    No results matching ""

    results matching ""

      No results matching ""