An open API service indexing awesome lists of open source software.

https://github.com/mimani68/auth-service

Authentication service template
https://github.com/mimani68/auth-service

json-web-token jwt mongodb refresh-token typescript

Last synced: about 2 months ago
JSON representation

Authentication service template

Awesome Lists containing this project

README

          

# Authentication Service

# usage

## get token

curl -X POST -d '{"username":"crm_user", "password":"j0f2bx4w1"}' -H "Content-Type: application/json" localhost:3000/api/auth

## get sample data (profile)

curl -X GET -H "Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOiIyMDE5LTAzLTAyVDEyOjI5OjE5LjM1NVoiLCJ1c2VybmFtZSI6ImNybV91c2VyIiwicGFzc3dvcmQiOiJqMGYyYng0dzEifQ.djbuzJVikqwPuUZix0k4rUx6n1DJUnaqi-9jOfBWvDU" -H "Content-Type: application/json" localhost:3000/api/profile

## get trial bundles

curl -X GET -H "Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOiIyMDE5LTAzLTAyVDEyOjI5OjE5LjM1NVoiLCJ1c2VybmFtZSI6ImNybV91c2VyIiwicGFzc3dvcmQiOiJqMGYyYng0dzEifQ.djbuzJVikqwPuUZix0k4rUx6n1DJUnaqi-9jOfBWvDU" -H "Content-Type: application/json" localhost:3000/api/bundle

## Setup process

You can use ***setup-simple.sh*** for install mock data.