Skip to content

Commit

Permalink
Merge pull request #74 from weierophinney/fix/markdown-lint
Browse files Browse the repository at this point in the history
Fix linting errors
  • Loading branch information
weierophinney authored Aug 7, 2024
2 parents 9a724c3 + 743bc69 commit 1c1a4b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/book/v1/authorization-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ use Mezzio\Authentication\OAuth2;

$app->post('/oauth2/token', OAuth2\TokenEndpointHandler::class);
```

## Parsing JSON payloads in the token endpoint
To enable the token endpoint to handle the POST requests in JSON, the [Body Parsing Middleware](https://docs.mezzio.dev/mezzio/v3/features/helpers/body-parse/) helper must be included in the application.

To enable the token endpoint to handle the POST requests in JSON, the [Body Parsing Middleware](https://docs.mezzio.dev/mezzio/v3/features/helpers/body-parse/) helper must be included in the application.

For example:

Expand All @@ -34,6 +36,7 @@ $app->post('/oauth2/token', [
OAuth2\TokenEndpointHandler::class
], 'auth.token');
```

WARNING: Do not pipe the body parsing middleware as generic middleware.
This ensures that the content body is only parsed when it is actually expected.

Expand Down

0 comments on commit 1c1a4b2

Please sign in to comment.