https://github.com/auth0/node-saml
SAML assertion creation for node
https://github.com/auth0/node-saml
Last synced: 9 months ago
JSON representation
SAML assertion creation for node
- Host: GitHub
- URL: https://github.com/auth0/node-saml
- Owner: auth0
- License: mit
- Created: 2012-12-29T23:55:52.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T16:14:17.000Z (over 1 year ago)
- Last Synced: 2025-04-03T15:11:11.182Z (9 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 70
- Watchers: 104
- Forks: 90
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# node-saml
Create SAML assertions. Supports SAML 1.1 and SAML 2.0 tokens.
[](https://travis-ci.org/auth0/node-saml)
### Supported Node Versions
node >= 12
### Usage
```js
var saml = require('saml').Saml20; // or 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: {
'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);
```
Everything except the cert and key is optional.
## Issue Reporting
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
## Author
[Auth0](auth0.com)
## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.