passport-saml
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -142,3 +142,3 @@ var debug = require('debug')('passport-saml'); | ||
signer.update(querystring.stringify(samlMessageToSign)); | ||
samlMessage.Signature = signer.sign(this.keyToPEM(this.options.privateCert), 'base64'); | ||
samlMessage.Signature = signer.sign(this.options.privateCert, 'base64'); | ||
}; | ||
@@ -501,13 +501,2 @@ | ||
SAML.prototype.keyToPEM = function (key) { | ||
key = key.match(/.{1,64}/g).join('\n'); | ||
if (key.indexOf('-BEGIN PRIVATE KEY-') === -1) | ||
key = "-----BEGIN PRIVATE KEY-----\n" + key; | ||
if (key.indexOf('-END PRIVATE KEY-') === -1) | ||
key = key + "\n-----END PRIVATE KEY-----\n"; | ||
return key; | ||
}; | ||
SAML.prototype.certsToCheck = function () { | ||
@@ -514,0 +503,0 @@ if (!this.options.cert) { |
{ | ||
"name": "passport-saml", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"xml-crypto": "^1.4.0", | ||
"xml-encryption": "^0.11.0", | ||
"xml-encryption": "^1.0.0", | ||
"xml2js": "0.4.x", | ||
@@ -37,0 +37,0 @@ "xmlbuilder": "^11.0.0", |
@@ -212,3 +212,3 @@ Passport-SAML | ||
Authentication requests sent by Passport-SAML can be signed using RSA-SHA1. To sign them you need to provide a private key in the PEM format via the `privateCert` configuration key. The certificate | ||
can start with `-----BEGIN PRIVATE KEY-----` on its own line and end with `-----END PRIVATE KEY-----` on its own line, or have these lines stripped out. | ||
should start with `-----BEGIN PRIVATE KEY-----` on its own line and end with `-----END PRIVATE KEY-----` on its own line. | ||
@@ -221,10 +221,3 @@ For example: | ||
Alternately: | ||
```javascript | ||
privateCert: 'MIICizCCAfQCCQCY8tKaMc0BMjANBgkqh ... W==' | ||
``` | ||
It is a good idea to validate the signatures of the incoming SAML Responses. For this, you can provide the Identity Provider's public PEM-encoded X.509 signing certificate using the `cert` confguration key. The "BEGIN CERTIFICATE" and "END CERTIFICATE" lines should be stripped out and the certificate should be provided on a single line. | ||
@@ -231,0 +224,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
469377
4851
351
+ Addedescape-html@1.0.3(transitive)
+ Addednode-forge@0.10.0(transitive)
+ Addedxml-encryption@1.3.0(transitive)
- Removedasync@2.6.4(transitive)
- Removedejs@2.7.4(transitive)
- Removedlodash@4.17.21(transitive)
- Removednode-forge@0.7.6(transitive)
- Removedxml-encryption@0.11.2(transitive)
- Removedxpath@0.0.27(transitive)
Updatedxml-encryption@^1.0.0