Skip to content

Instantly share code, notes, and snippets.

@dei79
Created June 8, 2015 18:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dei79/f894a52607ce1a63dfc7 to your computer and use it in GitHub Desktop.
Verifies an AAD token
var aad = require('azure-ad-jwt');
var jwtToken = '<<yourtoken>>';
aad.verify(jwtToken, null, function(err, result) {
if (result) {
console.log("JWT is valid");
} else {
console.log("JWT is invalid: " + err);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment