You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
25
+
26
+
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.
25
27
26
28
For example:
27
29
@@ -34,6 +36,7 @@ $app->post('/oauth2/token', [
34
36
OAuth2\TokenEndpointHandler::class
35
37
], 'auth.token');
36
38
```
39
+
37
40
WARNING: Do not pipe the body parsing middleware as generic middleware.
38
41
This ensures that the content body is only parsed when it is actually expected.
0 commit comments