From 8ac69f4ab5094e403062e4b95be2d4437de7ea8d Mon Sep 17 00:00:00 2001 From: Julien Zapata Duque <48630731+JulienZD@users.noreply.github.com> Date: Wed, 12 Feb 2025 04:09:13 +0100 Subject: [PATCH] docs: refer to correct object on request for express middleware (#3564) --- docs/api/express.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/express.md b/docs/api/express.md index d2bc258d5..b5a59a152 100644 --- a/docs/api/express.md +++ b/docs/api/express.md @@ -524,7 +524,7 @@ The following options can be passed when creating a new error handler: ### authenticate() -`express.authenticate(...strategies)` allows to protect an Express middleware with an [authentication service](./authentication/service.md) that has [strategies](./authentication/strategy.md) registered that can parse HTTP headers. It will set the authentication information on the `req` object (e.g. `req.user`). The following example protects the `/hello` endpoint with the JWT strategy (so the `Authorization: Bearer ` header needs to be set) and uses the user email to render the message: +`express.authenticate(...strategies)` allows to protect an Express middleware with an [authentication service](./authentication/service.md) that has [strategies](./authentication/strategy.md) registered that can parse HTTP headers. It will set the authentication information on the `req.feathers` object (e.g. `req.feathers.user`). The following example protects the `/hello` endpoint with the JWT strategy (so the `Authorization: Bearer ` header needs to be set) and uses the user email to render the message: ```ts import { authenticate } from '@feathersjs/express'