This repository has been archived by the owner on Sep 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Creating uPort Connect in any stack
Shayan Shokrgozar edited this page Aug 13, 2018
·
5 revisions
To create uport connect functionality in any stack, you need the following building blocks:
- JWT library, wrapped for DID functionality with support for EC DSA signatures on the secp256k1 curve [Example JS implementation].(https://github.com/uport-project/did-jwt)
- A way to resolve DID JWTs
- A way to Sign JWT's using the secp256k1 curve.
- Poll chasqui for updates
- dApp generates a random topic id randomIdDapp (ie: 1234-5678-9082)
- dApp presents the user a QR with callback: /message/{randomId}
- dApp subscribes to topic randomId, waits for address field.
- uPort Mobile app generates a random topic id (ie: 9923-1234-3234)
- uPort Mobile app subscribes to topic randomIdMobile
- uPort Mobile app scans URL from QR code
- uPort do a POST to the URL /message/{randomIdDapp} (callback scanned URL) with "address": "" and "callback": "<randomIdMobile"> as body parameter
- dApp app gets the address and the callback for the mobile app, and deletes the topic from the messaging server with DELETE /topic/{randomId}
- Use pututu if you want to send push notifications to the uPort mobile user.
References