samlify
High-level API for Single Sign On (SAML 2.0)
Last updated 2 months ago by tngan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install samlify 
SYNC missed versions from official npm registry.

samlify ·

Build Status npm version Coverage Status Join the community on Spectrum

Highly configuarable Node.js SAML 2.0 library for Single Sign On

Welcome PRs

Welcome all PRs for maintaining this project, or provide a link to the repositories especially for use cases alongside with different frameworks.

Sponsor

If you want to quickly implement SAML SSO, feel free to check out Auth0's NodeJS SDK and free plan at auth0.com/overview.

Installation

To install the stable version

Starting from v2.6, multiple schema validators are now supported. You can simply set the validator via the following global method. We have four validator modules right now, and you can write your own. The setSchemaValidator is required since v2.6, it will throw error if you don't set at the beginning.

import * as samlify from 'samlify';
import * as validator from '@authenio/samlify-xsd-schema-validator';
// import * as validator from '@authenio/samlify-validate-with-xmllint';
// import * as validator from '@authenio/samlify-node-xmllint';
// import * as validator from '@authenio/samlify-libxml-xsd'; // only support for version of nodejs <= 8

// const validator = require('@authenio/samlify-xsd-schema-validator');
// const validator = require('@authenio/samlify-validate-with-xmllint');
// const validator = require('@authenio/samlify-node-xmllint');
// const validator = require('@authenio/samlify-libxml-xsd');

samlify.setSchemaValidator(validator);

Now you can create your own schema validator and even suppress it but you have to take the risk for accepting malicious response.

samlify.setSchemaValidator({
  validate: (response: string) => {
    /* implment your own or always returns a resolved promise to skip */
    return Promise.resolve('skipped');
  }
});

For those using Windows, windows-build-tools should be installed globally before installing samlify if you are using libxml validator.

yarn global add windows-build-tools

Development

This project is now developed using TypeScript, also support Yarn which is a new package manager.

yarn global add typescript
yarn

Get Started

const saml = require('samlify');

See full documentation here

Example

react-samlify SP example powered by React, TypeScript and Webpack

Talks

An introduction to Single Sign On

License

MIT

Copyright

Copyright (C) 2016-present Tony Ngan, released under the MIT License.

Current Tags

  • 2.7.4                                ...           latest (2 months ago)

47 Versions

  • 2.7.4                                ...           2 months ago
  • 2.7.3                                ...           3 months ago
  • 2.7.2                                ...           3 months ago
  • 2.7.1                                ...           5 months ago
  • 2.7.0                                ...           5 months ago
  • 2.6.3                                ...           6 months ago
  • 2.6.2                                ...           8 months ago
  • 2.6.1                                ...           a year ago
  • 2.6.0                                ...           a year ago
  • 2.6.0-rc2                                ...           a year ago
  • 2.5.1                                ...           a year ago
  • 2.6.0-rc1                                ...           a year ago
  • 2.5.0                                ...           a year ago
  • 2.5.0-rc4                                ...           a year ago
  • 2.5.0-rc3                                ...           a year ago
  • 2.5.0-rc2                                ...           a year ago
  • 2.5.0-rc1                                ...           a year ago
  • 2.4.2                                ...           2 years ago
  • 2.4.1                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.4.0-rc6                                ...           2 years ago
  • 2.4.0-rc5                                ...           2 years ago
  • 2.4.0-rc4                                ...           2 years ago
  • 2.4.0-rc3                                ...           2 years ago
  • 2.4.0-rc2                                ...           2 years ago
  • 2.4.0-rc1                                ...           2 years ago
  • 2.3.8                                ...           2 years ago
  • 2.3.7                                ...           2 years ago
  • 2.3.6                                ...           3 years ago
  • 2.3.5                                ...           3 years ago
  • 2.3.4                                ...           3 years ago
  • 2.3.3                                ...           3 years ago
  • 2.3.2                                ...           3 years ago
  • 2.3.1                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 2.0.1-rc.3                                ...           3 years ago
  • 2.0.0-rc.3                                ...           3 years ago
  • 2.0.0-rc.2                                ...           3 years ago
  • 2.0.0-rc.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 54
This Month 57
Last Day 0
Last Week 4
Last Month 7
Dependencies (10)
Dev Dependencies (13)

Copyright 2014 - 2016 © taobao.org |