Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MultiStrategyConfig type export #675

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

thejaigoyal
Copy link
Contributor

Description

Exporting MultiStrategyConfig type from src index so the type is available and can be imported for segregating the code and be used like below

import { MultiSamlStrategy, VerifyWithRequest, MultiSamlConfig } from 'passport-saml';

const multiSamlOptions: MultiSamlConfig = {
  passReqToCallback: true, // makes req available in callback
  getSamlOptions: async (request, done) => {
    const configuration = await findProvider(request);
    return done(null, configuration);
  },
};

export const multiSamlStrategy = new MultiSamlStrategy(multiSamlOptions, login);

Checklist:

  • Issue Addressed: [ ]
  • Link to SAML spec: [ ]
  • Tests included? [ ]
  • Documentation updated? [ ]

@thejaigoyal
Copy link
Contributor Author

thejaigoyal commented Feb 23, 2022

This PR belongs to Issue #674

@markstos markstos requested a review from gugu February 23, 2022 12:26
@cjbarth cjbarth added the semver-patch This change requires at least a semver-patch version bump label Mar 31, 2022
@cjbarth cjbarth merged commit 47568e0 into node-saml:master Mar 31, 2022
@cjbarth cjbarth changed the title 🎨 add MultiStrategyConfig type export add MultiStrategyConfig type export Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch This change requires at least a semver-patch version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] passport-saml is not exporting enough types so we can segregate the code easily
2 participants