Skip to content

Commit

Permalink
Remove deprecated field privateCert from README, tests (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaikichi committed May 14, 2021
1 parent 6a7e476 commit 4eff276
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/adfs/README.md
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/node-saml/tests.spec.ts
Expand Up @@ -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://",
Expand Down

0 comments on commit 4eff276

Please sign in to comment.