Skip to content

jlsjefferson/jsonserver_passaport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Server + Passaport - JWT token

This is an implementation of a fake server using the technologies:

Passportjs

Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application.

(http://www.passportjs.org/)

json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)

Created with <3 for front-end developers who need a quick back-end for prototyping and mocking.

(https://github.com/typicode/json-server)

to use run the commands

  • git clone [email protected]:gustavoluciocampos/jsonserver_passaport.git

  • cd jsonserver_passaport git clone

In the firs request you need get a token:

After, with token we call all the collections like this:

  • curl -X GET
    http://localhost:3000/posts
    -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MX0.kHZQ03yhLOPC1c7f6CdItQbT2ljvMQLbucdJVkqwEKs'
    -H 'cache-control: no-cache'
    -H 'postman-token: f30faef9-0cb8-dd3b-43bf-4c3ee9ed0f20'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%