How to use the saml.Saml11 function in saml

To help you get started, we’ve selected a few saml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github auth0 / ad-ldap-connector / node_modules / wsfed / lib / wsfed.js View on Github external
var templates             = require('./templates');
var PassportProfileMapper = require('./claims/PassportProfileMapper');
var utils                 = require('./utils');
var saml11 = require('saml').Saml11;
var jwt                   = require('jsonwebtoken');

function asResource(res) {
  if(res.substr(0, 6) !== 'http:/' && 
      res.substr(0, 6) !== 'https:' && 
      res.substr(0, 4) !== 'urn:') {
    return 'urn:' + res;
  }
  return res;
}

/**
 * WSFederation middleware.
 *
 * This middleware creates a WSFed endpoint based on the user logged in identity.
 *