Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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.
*