Azure-Samples / active-directory-node-webapi

A NodeJS web API that is secured using Azure AD and OAuth 2.0 access tokens.
105 stars 64 forks source link

Token Validation on the API #28

Closed lizetpena closed 5 years ago

lizetpena commented 5 years ago

Hi, I downloaded this code sample to share it with a group of developers and noticed there is no token server side validation? Am I missing the location of this validation? Also, the only endpoint that is defined on the configuration is the metadata endpoint for AAD. Why?

Thank you.

Sincerely.

brandwe commented 5 years ago

Hello @lizetpena - the token validation happens using a library that is included in the sample called passport-azure-ad library.

It is at this location: https://github.com/AzureAD/passport-azure-ad/blob/dev/lib/jsonWebToken.js

Hope this helps!