Skip to content

Commit 8ac69f4

Browse files
authored
docs: refer to correct object on request for express middleware (#3564)
1 parent ba5621b commit 8ac69f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api/express.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ The following options can be passed when creating a new error handler:
524524

525525
### authenticate()
526526

527-
`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 <JWT>` header needs to be set) and uses the user email to render the message:
527+
`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 <JWT>` header needs to be set) and uses the user email to render the message:
528528

529529
```ts
530530
import { authenticate } from '@feathersjs/express'

0 commit comments

Comments
 (0)