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

express-authjs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-authjs

Simple authentication middleware for expressjs using JSON Web Tokens.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Express Auth Middleware

express-authjs is a simple to use express middleware that adds configurable authentication to your express API routes with as little affort as possible.

Table of Contents

  • Installation
  • Basic Usage
  • Documentation
  • Changelog
  • License

Getting Started

The instructions below will help you get started using exress-authjs as quickly as possible.

Installing

npm install express-authjs

Basic Usage

const express = require('express');
const { Authenticator, guard } = require('express-authjs');

const authenticator = new Authenticator();

app.get('/', (req, res) => {
    res.send('Unprotected route.');
})

app.get('/protected', guard(authenticator), (req, res) => {
    res.send('Protected route.');
})

Documentation

Please refer to the documentation website on https://nerderbur.github.io/express-authjs

Changelog

Check the Github Releases page

License

MIT License

Keywords

express-authjs

FAQs

Package last updated on 26 May 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