Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.
/ identity-hub-api Public archive

A bridge for request user profile with public key using Rest Api

Notifications You must be signed in to change notification settings

pfalfa/identity-hub-api

Repository files navigation

Identity Hub API

A brigde API for request identity hub with public key.

Usage

# Install depedencies
$ npm install

# Run application
$ npm run start

Using Docker

# Build docker image
$ docker build -t pfalfa-ihub-api .

# Run docker container
$ docker run --name pfalfa-ihub-api -d -p 3003:3003 pfalfa-ihub-api

How To Deploy

  • Rename .env.example to .env
  • Find line DB_PEERS in file .env to change database peers connections
  • Choose running application using npm or docker

API Doc

Host API : http://localhost:3003/api

Description Endpoint Method Status Response
Get User By Public Key /users/:pubkey GET 200 {success: true, message: null, data: {alias: "xxx", epub: "xxx", pub: "xxx"}}
403 {success: false, message: "Example wrong message", data: null}
/users GET 200 {success: true, message: null, data: {alias: "xxx", epub: "xxx", pub: "xxx"}}
Header Authorization: pubkey 403 {success: false, message: "Example wrong message", data: null}
  • Using headers
    • Required: Authorization pubkey
Endpoint Method Response
/api/users GET status 200: {success: true, message: null, data: {alias, epub, pub}}
status 400: {success: false, message: "Example wrong message", data: null}

About

A bridge for request user profile with public key using Rest Api

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published