• Stars
    star
    604
  • Rank 74,189 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Node.js library for SAML SSO

samlify ยท

Build Status npm version NPM Coverage Status

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/developers.

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.

More Repositories

1

loopback-redux-react-boilerplate

A boilerplate for a Redux-React application using LoopBack
JavaScript
108
star
2

g-dino

๐Ÿฆ– Train Google's dinosaur using neural network in browser
JavaScript
69
star
3

redux-hacker-news

A clone of hacker news powered by React.js and Redux
JavaScript
18
star
4

ts-express-angular2-node-boilerplate

Startup boilerplate for angular2 with typescript and expressjs
JavaScript
11
star
5

vaultenv

Loads environment variables from Hashicorp's vault
JavaScript
5
star
6

react-butterfly-button

Split button overlaid on an image
JavaScript
4
star
7

tensornode

(WIP) Access tensorflow model with Node.js
Protocol Buffer
4
star
8

sidebar-react-electron-boilerplate

ReactJS implementation of the sidebar navigation template (https://github.com/IronSummitMedia/startbootstrap-simple-sidebar) in Electron
JavaScript
3
star
9

translateer

Light-weight translator
JavaScript
2
star
10

n00b-elixir

n00b series of learning elixir from bottom
2
star
11

express-saml2-examples

Examples using express-saml2
JavaScript
1
star
12

rclex

rclpy (ROS Client Library for Elixir)
1
star
13

ros-orchestration

A state controller orchestrating ROS nodes
Python
1
star
14

hack-collection

A collection of hacking tutorials, blogs, video
1
star
15

react-pjax

PJAX implementation with ReactJS
JavaScript
1
star
16

ide-elixir

Elixir language support for Atom-IDE
1
star
17

WAIR

What Am I Reading ?
Elixir
1
star
18

advent-of-code-2017

Advent of code 2017
JavaScript
1
star
19

saving-face

The Saving Face project for Humphead Wrasse conservation
TypeScript
1
star
20

ros2-handbook

A curated list of ros2
1
star