sso
This commit is contained in:
parent
029fe23657
commit
1876580d86
911 changed files with 160008 additions and 2 deletions
22
node_modules/passport-saml/lib/test.js
generated
vendored
Normal file
22
node_modules/passport-saml/lib/test.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const passport = require("passport");
|
||||
const passport_saml_1 = require("./passport-saml");
|
||||
function findByEmail(email, cb) {
|
||||
cb(null);
|
||||
}
|
||||
passport.use(new passport_saml_1.Strategy({
|
||||
path: "/login/callback",
|
||||
entryPoint: "https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php",
|
||||
issuer: "passport-saml",
|
||||
}, function (profile, done) {
|
||||
if (profile != null && typeof profile.email === "string") {
|
||||
findByEmail(profile.email, function (err, user) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
return done(null, user);
|
||||
});
|
||||
}
|
||||
}));
|
||||
//# sourceMappingURL=test.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue