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
Hello.
I'm using this bundle to generate the documentation of an API.
The API is made available through Symfony 6.4 controllers.
Authentication is made through a JW Token, and works correctly.
Even if the user of the API has a JWT, I'm checking his application roles, as not every API endpoints are available to all users.
So in Symfony's API Controller, I'm checking this with the @IsGranted('ROLE_XXX') attribute.
How could I made this appear in the documentation ?
Thanks.
Additional context
No response
The text was updated successfully, but these errors were encountered:
For now, I use the #[OA\Response] to indicate this, but this is not very visible.
I looked for the Security annotation, but this seems not be usable with symfony app roles.
If you have an other idea to do this, don't hesitate to tell me.
Thanks for your answer. If I understand you well, there will be only 1 securityScheme to check the JWT token, and then the "scope" part of the #[Security] attribute will do the job for the documentation. Am I right ?
Version
4.31
Question
Hello.
I'm using this bundle to generate the documentation of an API.
The API is made available through Symfony 6.4 controllers.
Authentication is made through a JW Token, and works correctly.
Even if the user of the API has a JWT, I'm checking his application roles, as not every API endpoints are available to all users.
So in Symfony's API Controller, I'm checking this with the @IsGranted('ROLE_XXX') attribute.
How could I made this appear in the documentation ?
Thanks.
Additional context
No response
The text was updated successfully, but these errors were encountered: