Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve write API's authentication failure response #525

Closed
Tracked by #5523
aleene opened this issue Oct 23, 2016 · 3 comments
Closed
Tracked by #5523

Improve write API's authentication failure response #525

aleene opened this issue Oct 23, 2016 · 3 comments
Labels
🔐 API auth The API requires auth in order to perform editing.There is a common mechanism & a Robotoff mechanism API Refactor API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) P3

Comments

@aleene
Copy link
Contributor

aleene commented Oct 23, 2016

What

If the users adds the wrong credentials in the write API, the response is a standard HTML-page.

It should respond with a json-file and add the failure as a separate status code.

Code pointers

You can find some code pointers here. If some are missing, feel free to add them yourself in this file, or to ask them.

@teolemon teolemon added the API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) label Oct 23, 2016
@hangy
Copy link
Member

hangy commented Nov 16, 2016

Totally agree and the change should be easy. However, I fear that some apps depend on the way that the "product_jqm2.pl" (jquery mobile?) file works right now. Maybe it would be better to fix authentication in general (user/password in the URI is bad) and "RESTfulness" (see #510) in the new API? A good RESTful option might be to enable POST and PUT to the /api/v0/product/12345 url.

@aleene
Copy link
Contributor Author

aleene commented Nov 16, 2016

Time to think about the next version of the api, which exist next to the old version (and supports versions).

@teolemon teolemon modified the milestone: API Dec 11, 2016
@teolemon teolemon added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) and removed API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) labels Dec 11, 2016
@teolemon teolemon added the P3 label Jan 22, 2017
@teolemon teolemon removed the 🎯 P1 label Feb 16, 2017
@teolemon teolemon added the 🔐 API auth The API requires auth in order to perform editing.There is a common mechanism & a Robotoff mechanism label Apr 1, 2022
@teolemon teolemon moved this to To discuss and validate in 🍊 Open Food Facts Server issues Apr 23, 2024
@aleene
Copy link
Contributor Author

aleene commented Nov 13, 2024

too old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔐 API auth The API requires auth in order to perform editing.There is a common mechanism & a Robotoff mechanism API Refactor API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) P3
Projects
Archived in project
Development

No branches or pull requests

3 participants