How to use the passport-saml/multiSamlStrategy function in passport-saml

To help you get started, we’ve selected a few passport-saml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magma / magma / symphony / app / fbcnms-packages / fbcnms-auth / strategies / OrganizationSamlStrategy.js View on Github external
export default function OrganizationSamlStrategy(config: Config) {
  return new MultiSamlStrategy(
    {
      path: `${config.urlPrefix}/login/saml/callback`,
      getSamlOptions: async (req, done) => {
        try {
          const host = req.get('host');
          const organization = await req.organization();
          const configuration = {
            callbackUrl: `https://${host}${
              config.urlPrefix
            }/login/saml/callback?to=${req.query.to || '/'}`,
            cert: organization.ssoCert,
            entryPoint: organization.ssoEntrypoint,
            issuer: organization.ssoIssuer,
          };
          return done(null, configuration);
        } catch (err) {
github magma / magma / nms / app / fbcnms-packages / fbcnms-auth / strategies / OrganizationSamlStrategy.js View on Github external
export default function OrganizationSamlStrategy(config: Config) {
  return new MultiSamlStrategy(
    {
      path: `${config.urlPrefix}/login/saml/callback`,
      getSamlOptions: async (req, done) => {
        try {
          const host = req.get('host');
          const organization = await req.organization();
          const configuration = {
            callbackUrl: `https://${host}${
              config.urlPrefix
            }/login/saml/callback?to=${req.query.to || '/'}`,
            cert: organization.ssoCert,
            entryPoint: organization.ssoEntrypoint,
            issuer: organization.ssoIssuer,
          };
          return done(null, configuration);
        } catch (err) {

passport-saml

SAML 2.0 authentication strategy for Passport

MIT
Latest version published 1 year ago

Package Health Score

52 / 100
Full package analysis