Log in - nokia-wroclaw/innovativeproject-meetingdataexchange GitHub Wiki
URL:
{serverAddress}/api/account/login
Method:
POST
Content-type:
application/json
Method for web application:
public static ObjectNode web_login(String login, String password)
in controllers.Accounts
Description:
Log in and start new session. When login and password are correct server returns random string (calls "sid"), which must be exchange beetween client's application and server all the time in current session
Input:
{
"login": "your login",
"password": "MD5 hash of your password"
}
Output OK:
{
"status": "ok",
"sid": "session hash"
}
Output error:
{
"status": "failed",
"reason": "reason of error"
}
Types of reasons:
json expected
incorrect data
- incorrect password, or user login doesn't exist