🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

flora-auth-jwt

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flora-auth-jwt

JSON Web Token authentication for Flora

0.2.0
Source
npm
Version published
Maintainers
3
Created
Source

flora-auth-jwt

Build Status NPM version Dependencies

JSON Web Token authentication for Flora.

Example

const flora = require('flora');
const floraAuth = require('flora-auth-jwt');

const server = new flora.Server('./config.js');

server.register({
    secret: 'My Secret Key',
    credentialsRequired: false, // default: true
    validate: (jwt, request, cb) => {
        // callback value will go to request._auth
        return cb(null, { userId: jwt.sub });
    }
});
server.run();

License

MIT

FAQs

Package last updated on 30 Oct 2018

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