Nervous Parrot Muttering

npm

Need private packages and team management tools?Check out npm Orgs. »

azure-authenticate-express-middleware

1.1.1 • Public • Published

azure-autheniticate-express-middleware

An express middleware to verify that the token supplied with a request is from an authorised Azure AD user.

usage

const express = require('express');
const app = express();
 
const azureAuthenticateMiddleware = require('azure-authenticate-express-middleware');
const config = {
  tenantId: '4555f184-f629-4962-a914-2720ccc49c5a'
  clientId: 'd1348fb9-1ce4-4a1d-bc17-c752863e346b'
}
 
app.use(azureAuthenticateMiddleware(config));

The next piece of middleware excutes if you're token is valid. All other circumstances will return a 401.

  • the tenantId is used to validate the issuer
  • the clientId is used to validate the audience

install

npm i azure-authenticate-express-middleware

Downloadsweekly downloads

0

version

1.1.1

license

BSD-2-Clause

last publish

collaborators

  • avatar
Report a vulnerability