From 4eff2764fd9897cfea32643976c318e85d67f0d0 Mon Sep 17 00:00:00 2001 From: Daikichi Date: Fri, 14 May 2021 21:48:49 +0900 Subject: [PATCH] Remove deprecated field `privateCert` from README, tests (#591) --- README.md | 4 ++-- docs/adfs/README.md | 2 +- test/node-saml/tests.spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4d38bf38..5c98100e 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ As a convenience, the strategy object exposes a `generateServiceProviderMetadata The `decryptionCert` argument should be a public certificate matching the `decryptionPvk` and is required if the strategy is configured with a `decryptionPvk`. -The `signingCert` argument should be a public certificate matching the `privateCert` and is required if the strategy is configured with a `privateCert`. +The `signingCert` argument should be a public certificate matching the `privateKey` and is required if the strategy is configured with a `privateKey`. The `generateServiceProviderMetadata` method is also available on the `MultiSamlStrategy`, but needs an extra request and a callback argument (`generateServiceProviderMetadata( req, decryptionCert, signingCert, next )`), which are passed to the `getSamlOptions` to retrieve the correct configuration. @@ -279,7 +279,7 @@ See example from tests of [singleline private key](test/static/singleline_acme_t Add it to strategy options like this: ```javascript -privateCert: fs.readFileSync("./privateCert.pem", "utf-8"); +privateKey: fs.readFileSync("./privateKey.pem", "utf-8"); ``` 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` configuration key. The "BEGIN CERTIFICATE" and "END CERTIFICATE" lines should be stripped out and the certificate should be provided on a single line. diff --git a/docs/adfs/README.md b/docs/adfs/README.md index 2fc0dbdb..8127a9d7 100644 --- a/docs/adfs/README.md +++ b/docs/adfs/README.md @@ -45,7 +45,7 @@ passport.use( entryPoint: "https://adfs.acme_tools.com/adfs/ls/", issuer: "acme_tools_com", callbackUrl: "https://acme_tools.com/adfs/postResponse", - privateCert: fs.readFileSync("/path/to/acme_tools_com.key", "utf-8"), + privateKey: fs.readFileSync("/path/to/acme_tools_com.key", "utf-8"), cert: fs.readFileSync("/path/to/adfs.acme_tools.com.crt", "utf-8"), // other authn contexts are available e.g. windows single sign-on authnContext: diff --git a/test/node-saml/tests.spec.ts b/test/node-saml/tests.spec.ts index 113dca13..0c35ba20 100644 --- a/test/node-saml/tests.spec.ts +++ b/test/node-saml/tests.spec.ts @@ -355,7 +355,7 @@ describe("node-saml /", function () { testMetadata(samlConfig, expectedMetadata); }); - it("config with protocol, path, host, decryptionPvk and privateCert should pass", function () { + it("config with protocol, path, host, decryptionPvk and privateKey should pass", function () { const samlConfig = { issuer: "http://example.serviceprovider.com", protocol: "http://",