Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@overture-stack/ego-token-middleware

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@overture-stack/ego-token-middleware

Express middleware for validating ego JWT

latest
npmnpm
Version
2.4.1
Version published
Weekly downloads
261
190%
Maintainers
4
Weekly downloads
 
Created
Source

ego-token-middleware

Express middleware for validating ego JWT

Slack

Usage

import Auth from 'ego-token-middleware';
const app = express();
...
ِconst authFilter = Auth(jwtKeyUrl)(WRITE_SCOPE)
app.get('/protected', authFilter, (req: Request, res: Response) => {
  return res.send('I am protected');
});

The Ego JWT must be included in in the request as authorization in either the body or the header, with the format "Bearer __TOKEN__" where __TOKEN__ is the token.

This middleware needs the request to be ran through body-parser by the consuming app.

publishing

A github action is setup to run tests and auto publish to npm registry if the version in package.json is new when a push to master happens

FAQs

Package last updated on 21 Dec 2022

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