Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Status for "already logged in"

Say a REST client is logged in and attempts to login again, in which case the server ignores the request. What status should be returned here?

like image 697
mahemoff Avatar asked Aug 15 '13 23:08

mahemoff


1 Answers

I think your API could get away with returning the exact same status code / message as it would if it were a successful first login.

Here's why... The way I see it, you have two different scenarios from the perspective of the API: new login and re-login. programmatically there is a difference.

But, from the perspective of the API consumer, all the consumer wants to know is if login was successful, which it was.

like image 174
Kristian Avatar answered Sep 24 '22 20:09

Kristian