GithubHelp home page GithubHelp logo

isabella232 / samlify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tryretool/samlify

0.0 0.0 0.0 5.27 MB

๐Ÿ” Node.js API for Single Sign On (SAML 2.0)

Home Page: https://samlify.js.org

License: MIT License

Shell 0.11% Makefile 0.23% TypeScript 99.67%

samlify's Introduction

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.

samlify's People

Contributors

ahwitz avatar alexeysafronov avatar benbabic avatar bilalfastian avatar bitdeli-chef avatar bryaningl3 avatar dependabot[bot] avatar duane-talentsonar avatar duanem avatar fabianloewe avatar franklinjjeng avatar gtothesquare avatar kiejo avatar killalau avatar krystianolech avatar kvcpr avatar laverya avatar lynnzeng avatar marcbachmann avatar markstos avatar mitakuye avatar nflaig avatar peterwillis avatar puneetmakkar avatar sebakerckhof avatar seikho avatar shellscape avatar tngan avatar wdlowry avatar wwindcloud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.