1.1.1 • Published 7 years ago

azure-authenticate-express-middleware v1.1.1

Weekly downloads
1
License
BSD-2-Clause
Repository
-
Last release
7 years ago

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