Skip to content

Instantly share code, notes, and snippets.

@GGalizzi
Created January 20, 2023 12:00
Show Gist options
  • Save GGalizzi/1deea3cea22446881199b25855783b92 to your computer and use it in GitHub Desktop.
Save GGalizzi/1deea3cea22446881199b25855783b92 to your computer and use it in GitHub Desktop.
const { runServer } = require("saml-idp");
const domain = 'http://localhost:3000';
const url = 'withemailnode';
runServer({
acsUrl: `${domain}/auth/${url}/callback`,
audience:
`${domain}/auth/${url}`,
// sloUrl: `${domain}/auth/${url}/logout`,
config: {
// user: userDefaults,
// The auth-service requires at least one AttributeStatement in the SAML assertion.
metadata: [
{
id: "email",
optional: false,
displayName: "E-Mail Address",
description: "The e-mail address of the user",
multiValue: false,
},
{
id: "userType",
optional: true,
displayName: "User Type",
description: "The type of user",
options: ["Admin", "Editor", "Commenter"],
},
],
user: {
email: "node1@samltest.id",
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment