Skip to content

Conversation

@esarafianou
Copy link

Description

  1. saml20.createUnsignedAssertion() and saml11.createUnsignedAssertion() were added in version 0.15 but are not documented in README
  2. All exported functions work with callback, but the usage examples have them as sync functions. This PR fixes this

References

Testing

Only docs changes

@esarafianou esarafianou changed the title docs(readme): Document createUnsignedAssertion() docs(readme): Document createUnsignedAssertion() and improve usage examples May 13, 2021
};

var signedAssertion = saml.create(options);
saml.create(options, (err, samlAssertion) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synchronous invocation is actually supported unless the encryptionCert option has been passed in, at which point callback becomes required. It's a bit silly but that's how the library has behaved.

node-saml/lib/saml20.js

Lines 261 to 263 in 06acc02

if (strategies.encryptXml === EncryptXml.unencrypted) {
return strategies.encryptXml(signed, callback);
}

I'm ok with the change though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants