Hacker News new | ask | show | jobs
by emschwartz 1397 days ago
It is indeed. Could you explain why you’d recommend leaving it out in that case & what you’d recommend instead?

Thanks!

1 comments

In a multi tenant application you will strictly rely on the authenticated and authorized principal and the company id in which it resides when making every request. So baking it into the route is not great because you're never going to trust the value in the route anyway, you have to refer to the claim in your request.
Good point -- thanks!

I guess the one case where it might still make sense to have the organization ID in the path is if users can be in multiple organizations and some APIs involve listing all of a given resource for a certain organization.