benrondeau / Simple-JWT-Node.js-App

JSConf EU 2015 Workshop - Simple Node.js back end that issues/validates JSON Web Tokens (JWT)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic Node.js Backend for JSON Web Tokens

Basic Node.js server that issues JSON Web Tokens (JWT) and validates them before granting access to a protected route. This app has NO front end - a tool like Postman is needed to use the app.

Requirements

  • Node.js v4.0+ (app uses ES6)

Get Started

  • Download Repo
  • cd into project directory and npm install
  • npm start
  • Open Postman and tool around with app

Routes

  • POST /authenticate: route to send username/password to and receive token
  • GET /protected: route that requires a valid JWT to respond with data

About

JSConf EU 2015 Workshop - Simple Node.js back end that issues/validates JSON Web Tokens (JWT)


Languages

Language:JavaScript 100.0%