Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passport-saml-metadata

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-saml-metadata

SAML2 metadata loader for passport-saml-restify

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
increased by16.95%
Maintainers
1
Weekly downloads
 
Created
Source

passport-saml-metadata

This project provides Metadata-based configuration of the passport-saml-restify strategy.

When called, it will attempt to load the metadata XML from the supplied URL. If it fails due to a request timeout or other error, it will attempt to load from the backupStore cache.

Metadata-based configuration of SAML login code is better than configuring URLs and certificates because it ensures certificates between a ID Provider and application stay in sync.

Installation

npm install passport-saml-metadata

Usage

const os = require('os');
const loadMetadata = require('passport-saml-metadata');
const FileCache = require('file-system-cache');
const SamlStrategy = require('passport-saml-restify').Strategy;

loadMetadata({
  url:'https://adfs.company.com/federationMetadata/2007-06/FederationMetadata.xml',
  timeout: 1500,
  backupStore: new FileCache({ basePath: os.tmpdir() })
}).then((config) => {
  // config.entryPoint
  // config.logoutUrl
  // config.cert
  // config.identifierFormat
  passport.use(new SamlStrategy(
    Object.assign(config, {
      path: '/login/callback',
      issuer: 'passport-saml'
    }),
    function(profile, done) {
      done(null, profile);
    }
  );
});

Keywords

FAQs

Package last updated on 02 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc