docs
docs copied to clipboard
RFC Create a documentation page explaining how to work with User context
Extracting this from Slack to discuss whether it would be useful to have it on api-platform's docs.
My original question:
if I need to create an entity X for the current user (X has User relation M:1) with JWT authentication, do I need to send
userIdin thePOSTrequest and validate so that it is the same as inJWTtoken?Can I not send
userIdand determine it from theJWTor somehow else?which one is the right way (or api-platform way)? Thanks
And folks pointed me to this article: https://symfonycasts.com/screencast/api-platform-security/entity-listener (Auto-set the Owner: Entity Listener)
Questions:
- Do you think api-platform needs this kind of docs / examples right on the api-platform.com site?
- What's your (core team's) vision about this approach?
I'm here again to help people finding answers quicker, that's why I need you opinion about whether it should be in the official docs. Thank you.