我正在构建一个启用Salesforce SSO的服务器。登录应用程序并收到回调时,出现此错误
错误:响应中缺少InResponseTo在SAML.validateInResponseTo(/node_modules/passport-saml/lib/passport-saml/saml.js:746:13)在/node_modules/passport-saml/lib/passport-saml/saml.js:602:19在Promise.apply(/node_modules/q/q.js:1185:26)在Promise.promise.promiseDispatch(/node_modules/q/q.js:808:41)在/node_modules/q/q.js:1411:14在runSingle(/node_modules/q/q.js:137:13)在刷新时(/node_modules/q/q.js:125:13)在processTicksAndRejections(internal / process / task_queues.js:75:11)
我的privateCert错误吗?还是我应该在saml策略中设置任何内容?我不确定错误是从哪里来的。我该如何解决..?
// Certificates
// Private key to use for SSL -----BEGIN PRIVATE KEY----
var privateKey = fs.readFileSync(__dirname + '/../certs/server.key', 'utf8');
// Public x509 certificate to use ------BEGIN CERTIFICATE-----
var certificate = fs.readFileSync(__dirname + '/../certs/server.crt', 'utf8');
// Aloha SSO Metadata
var idpCert = fs.readFileSync(__dirname + '/../certs/idp_cert.pem', 'utf8');
var samlStrategy = new saml.Strategy({
entryPoint: 'https://aloha.my.salesforce.com/idp/loginpp=0aaaaasdasdB',
issuer: 'urn:myapp',
identifierFormat: null,
decryptionPvk: privateKey, //.key version
// validateInResponseTo: true, <- I tried this with FALSE AS WELL.
disableRequestedAuthnContext: false,
cert: idpCert, //Aloha (IDP) metadata // provide it with single line if there is any error
}, function(profile, done) {
return done(null, profile);
});
passport.use('samlStrategy', samlStrategy);
非常感谢
错误:InResponseTo在以下情况下发生: