New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

express-jwt-handler

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-jwt-handler

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

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

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

Keywords

api

FAQs

Package last updated on 10 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts