Simple and Active Maintenance
Easy to use API with active community support and regular updates

To install the stable version
npm install samlifyor
yarn add samlifySimple solution of Identity Provider is provided in this module for test and educational use. Work with other 3rd party Identity Provider is also supported.
API Changes
API is changed since v2. All file attributes like metadata and keyFile, it's expected to be normalized as string. It allows easy integration with database storage and import from local file system.
The constructor of entity is also modified to accept a single configuration object instead of putting metadata and advanced configurations in separate arguments.
const saml = require('samlify');
// configure a service provider
const sp = saml.ServiceProvider({
metadata: fs.readFileSync('./metadata_sp.xml')
});
// configure the corresponding identity provider
const idp = saml.IdentityProvider({
metadata: fs.readFileSync('./metadata_idp.xml')
});
// parse when receive a SAML Response from IdP
router.post('/acs', (req, res) => {
sp.parseLoginResponse(idp, 'post', req)
.then(parseResult => {
// Write your own validation and render function here
})
.catch(console.error);
});Our default validation is to validate signature and the issuer name of Identity Provider. The code base is self explained. More use cases are provided in this documentation to fit in the real world application.
MIT