-
Notifications
You must be signed in to change notification settings - Fork 477
Closed
Labels
documentationRequest for or contribution to documentationRequest for or contribution to documentation
Description
The readme shows the following example:
passport.use(
new MultiSamlStrategy(
{
passReqToCallback: true, // makes req available in callback
getSamlOptions: function (request, done) {
findProvider(request, function (err, provider) {
if (err) {
return done(err);
}
return done(null, provider.configuration);
});
},
},
function (req, profile, done) {
// for signon
findByEmail(profile.email, function (err, user) {
if (err) {
return done(err);
}
return done(null, user);
});
},
function (req, profile, done) {
// for logout
findByNameID(profile.nameID, function (err, user) {
if (err) {
return done(err);
}
return done(null, user);
});
}
)
);
But this doesnt seem to be valid JavaScript. All three parameter contain a function within a function:
function (request, done) {
findProvider(request, function (err, provider) {
Further the example shows new SamlStrategy() and new MultiSamlStrategy() with three arguments but according to the TypeScript interface the constructor only accepts two arguments. In this case I wonder if the Typings are wrong or the readme.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationRequest for or contribution to documentationRequest for or contribution to documentation
