Create SAML assertions.

npm install saml
2 downloads in the last day
5 downloads in the last week
179 downloads in the last month

Create SAML assertions.

NOTE: currently supports SAML 1.1 tokens

Build Status


var saml11 = require('saml').Saml11;

var options = {
  cert: fs.readFileSync(__dirname + '/test-auth0.pem'),
  key: fs.readFileSync(__dirname + '/test-auth0.key'),
  issuer: 'urn:issuer',
  lifetimeInSeconds: 600,
  audiences: 'urn:myapp',
  attributes: {
    '': '',
    '': 'Foo Bar'
  nameIdentifier: 'foo'

var signedAssertion = saml11.create(options);

Everything except the cert and key is optional.

npm loves you