Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated field privateCert from README, tests #591

Merged
merged 4 commits into from May 14, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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