Context
User wants to login
URL
https://<api-url>/webapp/1.0/login
Method
POST
Parameters
p70 : username
p80 : password
p90 : platform url
Response:
200 : OK
Header:
_aid: <app id>
Body
<response>
<clientid>{client id}</clientid>
<clientname>{client name}</clientname>
<clientuuid>{client uuid}</clientuuid>
<apikey>{client api key}</apikey>
<logintimeoutperiod>{max time for offline access}</logintimeoutperiod>
<adminemail>{ email address for admin contact }</adminemail>
<passwordexpiryperiod>{password expiry period in days }</passwordexpiryperiod>
<userverificationperiod>{verification period for email in days}</userverificationperiod>
<offlineexpiryperiod>{ offline expiry period in hours }</offlineexpiryperiod>
<foldericon>{default folder icon name if custom, otherwise null}
<annotations>{BASIC | ADVANCED | null}</annotations>
<comments>{ 1 | null}</comments>
<firstname>{user first name}</firstname>
<lastname>{user last name}</lastname>
<useruuid>{user uuid}</useruuid>
<loginattempts>{login attempts allowed}</loginattempts>
<passwordexpired>{null | integer}</passwordexpired>
<emailexpired>{null | integer}</emailexpired>
<version>{1 | null}<versions>
</response>
or
200 : OK
Body
<response>
<apiserver>{api server url}</apiserver>
</response>
401 : Unauthorized
Body :
<response>
<message>Invalid username or password</message>
<message>Max failed login attempts</message>
</response>
500 : Internal server error
Actions
Upon successful login,
store the client name with the URL for future reference
store apikey for inclusion in future requests
store logintimeoutperiod to know when to log user out
If passwordexpired is not null then
display Password Reset screen
If emailexpired is not null then
display User Verification screen
Notes
Last modified on 2/08/2016 8:09 AM by User.