1.0.9 • Published 6 years ago

@flightstats/auth-js v1.0.9

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

AuthJS

The express middleware bits for your Airframe app

This module makes it easy to integrate with Airframe auth components (yarn add @bit/cirium.airframe.core.auth)

Though there are many different Airframe apps, the way that server-side authentication happens should be the same, and AuthJS is where auth server-side implementation will be housed

Usage

Create a protected route:

  const JWTMiddleware = checkJWT();

  server.get('/api/protected', JWTMiddleware, (req, res) => {
    res.send({
      msg: 'your access token was successfully validated!',
    });
  });

Handle authorization errors:

  ...

  const jwtException = jwtErrorMiddleware();

  server.use(jwtException);

Prerequisites

Installing

Install dependencies using yarn

yarn

Versioning

We use SemVer for versioning.

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago