Subterfuge-Revived / Remake-Backend

Server side validation and API
Creative Commons Zero v1.0 Universal
10 stars 1 forks source link

No validation on login request #19

Closed griendt closed 4 years ago

griendt commented 4 years ago

Expected Behavior

When not providing the right fields in the login request (username and password), the response should be 422 Unprocessable Entity.

Current Behavior

The backend simply attempts authentication with the info it has, which, if incomplete, always returns a 401 Unauthorized response code.

Failure Information

Possible Solution

Include validation :)

Steps to Reproduce

  1. Call the login endpoint with either the username or password field missing (or both).