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

Fix node saml #2

Merged
merged 2 commits into from
May 9, 2020
Merged

Fix node saml #2

merged 2 commits into from
May 9, 2020

Conversation

jonlindsey
Copy link

@jonlindsey jonlindsey commented May 9, 2020

Fix: During vigorous unit testing with planted errors in local functions the callback function wrapping a callback function for encryption reported 'callback already called' messages, ingesting the true error source.

Description

The wrapper fo the existing encryption callback function was changed to a promise streamlining code. Errors report perfectly back to the calling application no matter nesting level in saml20.cs.

In addition 2 error checks were added to keep needless processing cycles from occurring

  1. If the XML argument for signing is null, undefined or empty a
    'XML to sign cannot be null or empty.'
    reference error is thrown keeping the xml parser from failing.

  2. If the assertion argument to be imbedded in the response XML is undefined, null or empty a
    'Assertion XML cannot be empty for parsing while creating SAML20 Response.'
    reference error is thown keeping the parser from failing.

Testing

mocha

Checklist

This was back tested in node-sso-formatter by unit/e2e with both embedded errors insuring proper return, and 100% testing success.

@brandonros brandonros merged commit ced0eb0 into master May 9, 2020
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