npm

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

azure-authenticate-claudia-intercept

1.0.4 • Public • Published

azure-autheniticate-claudia-intercept

A claudiajs intercept to verify that the token supplied with a request is from an authorised Azure AD user.

usage

const ApiBuilder = require('claudia-api-builder');
const api = new ApiBuilder();
 
const azureAuthenticateIntercept = require('azure-authenticate-claudia-intercept');
const config = {
  tenantId: '4555f184-f629-4962-a914-2720ccc49c5a'
  audience: 'https://graph.windows.net'
}
 
api.intercept(azureAuthenticateIntercept(api, 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 audience is used to validate the audience

install

npm i azure-authenticate-claudia-intercept

Downloadsweekly downloads

21

version

1.0.4

license

BSD-2-Clause

last publish

collaborators

  • avatar
Report a vulnerability