Azure AD B2B NodeJS Jwt验证签名无效

时间:2018-06-18 12:05:29

标签: node.js azure oauth jwt

我正在尝试验证azure为B2B tenent提供的jwt访问令牌与节点js

var aad  = require('azure-ad-jwt');

var jwtToken = '<jwtToken>'


aad.verify(jwtToken, {
        JWK_URI: 'https://login.windows.net/<tenent id>/discovery/keys',
        ISS: 'https://sts.windows.net/<tenent id>/',
        AUD: "https://graph.microsoft.com"
      }, function(err, result) {

    if (result) {
        console.log(result)
        console.log("JWT is valid");
    } else {
        console.log("JWT is invalid: " + err);
    }
});

但是收到无效的签名错误。

0 个答案:

没有答案