Standardize HTTP Responses #4

Open
opened 2021-01-14 16:30:15 -06:00 by glm94 · 1 comment
Owner

The responses that the AuthController sends to certain events may not be entirely appropriate. Before this is marked as version 1.0, these should be standardized.

The responses that the AuthController sends to certain events may not be entirely appropriate. Before this is marked as version 1.0, these should be standardized.
glm94 added the enhancement label 2021-01-14 16:30:15 -06:00
Author
Owner

Response code 422 should be returned if a parameter fails to validate as noted in this Quora post. More details on 422 here from Mozilla's docs. As a side note, code 403 is for when the server knows who the user is but they simply lack the rights to a resource, whereas code 401 is for when the server doesn't know who the client is as they have not authenticated yet.

Response code 422 should be returned if a parameter fails to validate as noted in this [Quora](https://www.quora.com/Which-HTTP-code-is-best-suited-for-validation-errors-400-or-422) post. More details on 422 here from [Mozilla's](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422) docs. As a side note, [code 403](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) is for when the server knows who the user is but they simply lack the rights to a resource, whereas [code 401](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) is for when the server doesn't know who the client is as they have not authenticated yet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: glm94/secure-core#4