/Skeleton-Bearer-PassportJs

Skeleton app running on NodeJS and Express4, using Bearer authentication mechanism

Primary LanguageJavaScript

Skeleton-Bearer-PassportJs

Skeleton of a Node.JS/ExpressJs 4 RestAPI using the Bearer Passport authentication mechanism.
The app / client require an API key (see models) to access the ressources.


Suggestion : use it with PassportJS Oauth2

To install :

  • 1) Make sure you have NodeJS LTS and MongoDB installed :)
  • 2) git clone https://github.com/grayrainbow/Skeleton-Bearer-PassportJs
  • 3) npm install
  • 5) set DEBUG=myapp:* | npm start
  • 6) Browse to http://localhost:3000

For testing, in a terminal, do :

curl -v http://127.0.0.1:3000/authenticate/?access_token=123456789
curl -v http://127.0.0.1:3000/?access_token=123456789