ADFS возвращает провайдера SAML, возвращено Ошибка ответчика: не указано - PullRequest
0 голосов
/ 10 ноября 2018

passport.js

var
  fs = require('fs')
 , passport = require('passport')
 , SamlStrategy = require('passport-saml').Strategy;

passport.serializeUser(function(user, done) {
done(null, user);
});

passport.deserializeUser(function(user, done) {
  done(null, user);
});

passport.use(new SamlStrategy(
 {
   entryPoint: 'https://<ADFS Host>/adfs/ls/',
   issuer: 'https://<SP_HOST>:<SP_PORT>/',
   callbackUrl: 'https://<SP_HOST>:<SP_PORT>/postResponse',
   //Private key for the SP machine
   privateCert: fs.readFileSync('./bin/ssl/key.pem', 'utf-8'),
   cert: fs.readFileSync('ADFS-ServerPub.cer', 'utf-8'),
  // other authn contexts are available e.g. windows single sign-on
   authnContext: 'http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password',
  // this is configured under the Advanced tab in AD FS relying party
   signatureAlgorithm: 'sha256'
 },
 function(profile, done) {
   return done(null,
     {
       upn: profile['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn'],
                          // e.g. if you added a Group claim
       group: profile['http://schemas.xmlsoap.org/claims/Group']
    });
   }
));

module.exports = passport;

Ошибка ниже, после того как она была представлена ​​со страницей входа в ADFS и предоставила ей учетные данные для входа:

Поставщик SAML возвратил ошибку ответчика: не указано Ошибка: поставщик SAML возвратил ошибку ответчика: не указано в C: \ LexTest \ node_modules \ passport-saml \ lib \ passport-saml \ saml.js: 662: 31 в _fulfilled (C: \ LexTest \ node_modules \ q \ q.js: 854: 54) в C: \ LexTest \ node_modules \ q \ q.js: 883: 30 в Promise.promise.promiseDispatch (C: \ LexTest \ node_modules \ q \ q.js: 816: 13) в C: \ LexTest \ node_modules \ q \ q.js: 570: 49 при запуске Single (C: \ LexTest \ node_modules \ q \ q.js: 137: 13) при сбросе (C: \ LexTest \ node_modules \ q \ q.js: 125: 13) at process._tickCallback (internal / process / next_tick.js: 61: 11)

...