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

The readme example returns undefined #99

Open
ajinvise opened this issue Oct 6, 2023 · 1 comment
Open

The readme example returns undefined #99

ajinvise opened this issue Oct 6, 2023 · 1 comment

Comments

@ajinvise
Copy link

ajinvise commented Oct 6, 2023

Im looking to sign an assertion. Trying out this lib like the readme suggest returns in undefined?

  var saml = require('saml').Saml20; // or Saml11

  var options = {
    cert, // from my X.509 certificate
    key, // from my X.509 certificate
    issuer: 'urn:issuer',
    lifetimeInSeconds: 600,
    audiences: 'urn:myapp',
    attributes: {
      'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress': 'foo@bar.com',
      'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name': 'Foo Bar'
    },
    nameIdentifier: 'foo',
    sessionIndex: '_faed468a-15a0-4668-aed6-3d9c478cc8fa'
  };
  
  var signedAssertion = saml.create(options);

  console.log(signedAssertion) // undefined (?!)
@mpajon
Copy link

mpajon commented Oct 6, 2023

Maybe it's because node version.
With version 18.0.0 I had the same problem but with 20.8.0 it works

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

No branches or pull requests

2 participants