Suppose I have a RESTful authentication endpoint:
http://example.com/api/v1/auth
- A
POST
request with email and password allows for logging in. A request gets countered with a response with HTTP 200 for correct login or 403 for incorrect. - A
DELETE
request allows for logging out.
It's obvious that after a successfuly logout I should return HTTP 200. What HTTP response code should I return, if a user tries to logout without being logged in?