(WIP) Service to Authenticate using a Chlu DID
Also has a couple API calls to read DIDs and Chlu unverified reviews
yarn
to install depsyarn start
to start a server. Use--help
for configuration optionsyarn test
to run tests
GET /
use this to check if the service is upGET /did/:didId
didId
is either a Chlu DID UUID or a multihash for the DID Document- returns the associated DID Document in
application/json
GET /reputation/:didId
didId
is either a Chlu DID UUID or a multihash for the DID Document- returns the associated Chlu Reputation JSON in this format:
{ reviews: [...] }
GET /did/login/:didId/:nonce/:signature
didId
is either a Chlu DID UUID or a multihash for the DID Documentnonce
is a string that has been signed by the DID Private Keysignature
is a hex encoded signature of thenonce
using the private key of the DID- returns an object of the form
{ valid: Boolean, ddo: Object }
. Valid will be true if the auth succeeded. DDO is only present if valid and contains the reputation object - error if the authentication has failed