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 = ;const app = ; const azureAuthenticateMiddleware = ;const config = tenantId: '4555f184-f629-4962-a914-2720ccc49c5a' clientId: 'd1348fb9-1ce4-4a1d-bc17-c752863e346b' app;
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