Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

#### 💣 Major Changes

- deps: use node-saml v4. See node-saml changelog for breaking changes: https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28 [#796](https://github.com/node-saml/passport-saml/pull/796)
- deps: use node-saml v4. See node-saml changelog for breaking changes: https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28 [#796](https://github.com/node-saml/passport-saml/pull/796)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Wrap bare URL in angle brackets to comply with markdown lint (MD034).

The bare URL should be wrapped in angle brackets: <https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28> to satisfy the no-bare-urls linting rule.

📝 Proposed fix
- deps: use node-saml v4. See node-saml changelog for breaking changes: https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28 [#796](https://github.com/node-saml/passport-saml/pull/796)
+ deps: use node-saml v4. See node-saml changelog for breaking changes: <https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28> [#796](https://github.com/node-saml/passport-saml/pull/796)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- deps: use node-saml v4. See node-saml changelog for breaking changes: https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28 [#796](https://github.com/node-saml/passport-saml/pull/796)
- deps: use node-saml v4. See node-saml changelog for breaking changes: <https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28> [#796](https://github.com/node-saml/passport-saml/pull/796)
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

130-130: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In @CHANGELOG.md at line 130, Wrap the bare URL in the CHANGELOG entry so it’s
not a bare URL; update the line containing the node-saml changelog link
(https://github.com/node-saml/node-saml/blob/master/CHANGELOG.md#v400-2022-10-28)
to enclose the URL in angle brackets like <https://...> to satisfy
MD034/no-bare-urls linting.

- Update node-saml to beta 5 -- See node-saml changelog for breaking changes [#783](https://github.com/node-saml/passport-saml/pull/783)
- Update node-saml dependency [#770](https://github.com/node-saml/passport-saml/pull/770)
- Update to support node-saml@4.0.0-beta.3 [#707](https://github.com/node-saml/passport-saml/pull/707)
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ object that represents the user.
You need to provide a route corresponding to the `path` configuration parameter given to the
strategy:

#### Express v4.x

The authentication callback must be invoked after the `body-parser` middleware.

```javascript
// Express v4
const bodyParser = require("body-parser");

app.post(
Expand All @@ -197,6 +200,25 @@ app.post(
);
```

#### Express v5.x

The authentication callback must be invoked after the `express.urlencoded({ extended: false })` middleware.

```javascript
// Express v5
app.post(
"/login/callback",
express.urlencoded({ extended: false }),
passport.authenticate("saml", {
failureRedirect: "/",
failureFlash: true,
}),
function (req, res) {
res.redirect("/");
},
);
```

### Authenticate requests

Use `passport.authenticate()`, specifying `saml` as the strategy:
Expand Down
Loading