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

passport-saml

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-saml - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

docs/adfs/README.md

27

lib/passport-saml/saml.js

@@ -69,2 +69,7 @@ var zlib = require('zlib');

// sha1 or sha256
if (!options.signatureAlgorithm) {
options.signatureAlgorithm = 'sha1';
}
return options;

@@ -105,6 +110,16 @@ };

SAML.prototype.signRequest = function (xml) {
var signer = crypto.createSign('RSA-SHA1');
signer.update(xml);
return signer.sign(this.options.privateCert, 'base64');
SAML.prototype.signRequest = function (samlMessage) {
var signer;
switch(this.options.signatureAlgorithm) {
case 'sha256':
samlMessage.SigAlg = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256';
signer = crypto.createSign('RSA-SHA256');
break;
default:
samlMessage.SigAlg = 'http://www.w3.org/2000/09/xmldsig#rsa-sha1';
signer = crypto.createSign('RSA-SHA1');
break;
}
signer.update(querystring.stringify(samlMessage));
samlMessage.Signature = signer.sign(this.options.privateCert, 'base64');
};

@@ -273,4 +288,4 @@

if (self.options.privateCert) {
samlMessage.SigAlg = 'http://www.w3.org/2000/09/xmldsig#rsa-sha1';
samlMessage.Signature = self.signRequest(querystring.stringify(samlMessage));
// sets .SigAlg and .Signature
self.signRequest(samlMessage);
}

@@ -277,0 +292,0 @@ Object.keys(samlMessage).forEach(function(k) {

{
"name": "passport-saml",
"version": "0.11.1",
"version": "0.12.0",
"licenses": [

@@ -5,0 +5,0 @@ {

@@ -54,2 +54,3 @@ Passport-SAML

* `decryptionPvk`: optional private key that will be used to attempt to decrypt any encrypted assertions that are received
* `signatureAlgorithm`: optionally set the signature algorithm for signing requests, valid values are 'sha1' (default) or 'sha256'
* Additional SAML behaviors

@@ -140,2 +141,4 @@ * `additionalParams`: dictionary of additional query params to add to all requests

For more detailed instructions, see [this document from Tim Brody](docs/adfs/README.md).
## SAML Response Validation - NotBefore and NotOnOrAfter

@@ -142,0 +145,0 @@

Sorry, the diff of this file is too big to display

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