Task:Single sign-on/UserManagement-API

Contents

[edit] URL map

[edit] GET requests

[edit] /transactions/list/?since=UUID

Returns array of transactions, which happened later then UUID specified. Possible reply:

   [
       {   "uuid":"00000000-0000-0000-C000-000000000046",
           "action":"create",
           "timestamp":"2009-08-04T00:07:12+04:00",
           "data":{
               "uuid":"00000000-0000-0001-C000-000000000046",
               "login":"maemo",
               "email":"maemo@example.com",
               "firstname":"N",
               "lastname":"810",
               "foo":"bar"
           }
       },
       {   "uuid":"00000000-0000-0000-C000-000000000047",
           "action":"update",
           "timestamp":"2009-08-04T00:07:13+04:00",
           "data":{
               "uuid":"00000000-0000-0001-C000-000000000047",
               "login":"johndoe",
               "email":"johndoe@example.com",
               "firstname":"jonn",
               "lastname":"doe",
               "foo":"bar"
           }
       },
       {   "uuid":"00000000-0000-0000-C000-000000000049",
           "action":"delete",
           "timestamp":"2009-08-04T00:07:22+04:00"
       }
   ]

[edit] /user/?param=value

For example:

   /user/?uuid=00000000-0000-0000-C000-000000000046
   /user/?login=maemo
   /user/?email=maemo@example.com

These return [false] or array of single user's data:

   {
       "uuid":"00000000-0000-0001-C000-000000000047",
       "login":"johndoe",
       "email":"johndoe@example.com",
       "firstname":"jonn",
       "lastname":"doe",
       "foo":"bar"
   }

[edit] POST requests

[edit] /user/

Create user

Expects array with user-data as request-body

Returns [UUID] or [false]

[edit] /user/?uuid=UUID

Update user whose UUID matches

Expects array with user-data as request-body

Returns [true] or [false]

[edit] DELETE requests

[edit] /user/?uuid=UUID

Delete user whose UUID matches

Returns [true] or [false]

[edit] Implementation details

User-management service will be powered by Midgard-2 technology. Data will be represented by objects of 2 types: