0.2.2 • Published 8 years ago

express-jwt-handler v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

express-jwt-handler Build Status

Verifies received JSON Web Token and sets the current user based on issuer.

Install

$ npm install --save express-jwt-handler

Usage

var express = require('express');
var jwtHandler = require('express-jwt-handler');

var app = express();

// Use as middleware and pass the secret
app.use(jwtHandler('secret123'));

app.get('/user', function (req, res, next) {
  // req.user_id is set to JWT issuer
});

The secret can also be set as an environment variable called JWT_SECRET.

Send the JSON Web Token as Authorization: Bearer TOKEN.

License

MIT © Richard Käll

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago