I am trying to use passport-saml to authenticate against TestShib. I have been modifying gbraad's example. After being directed to TestShib and providing the example un and pw details I get directed back to my app 'http://localhost:2000/login/callback' as expected, but the screen shows '[object Object]'. The console shows: POST http://localhost:2000/login/callback 500 (Internal Server Error)
I have changed the little as possible from gbradd's code. The testShib log appears to show that it is posting back to my app correctly.
I can avoid getting the error msg by changing the post route so that it doesn't call 'passport.authenticate', so it is clearly having a problem authenticating the data testShib returns.
I tried adding some error handling to app.post, but am fairly new to node and wasn't able to get anything useful from this.
I am using the default post route:
app.post(config.passport.saml.path,
passport.authenticate(config.passport.strategy, // calls the authenticate method of the passport module
{
failureRedirect: '/',
failureFlash: true
}),
function (req, res) {
res.redirect('/');
}
);
Please suggest how I should troubleshoot this.
via Paul Trotter
No comments:
Post a Comment