Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem Statement

Related Jira Task - 
Jira Legacy
serverSystem JIRA
serverId2207a759-5bc8-39c5-9cd2-aa9ccc1f65dd
keySB-11433

...

ProsCons
No overhead to SSO API. Comparison of fields and updation, if needed, happens asynchronously.It's very rare for the payload data of a particular user to change. Though the execution is asynchronous, still there's an overhead to the system to perform this check for each request


Code Block
languagejs
titleMessage Format
{
  // about the event
  "identifier": "",         // unique event id
  "ets": ,                  // epoch timestamp of event (time in milli-seconds. For ex: 1556018741532)
  "operationType": "",      // operation to be done, in this case it's UPDATE
  "eventType": "",          // type of event, in this case it's transactional
                            
  // event data             
  "event": {                
    "userExternalId": "",   // externalId of the user
    "nameFromPayload": "",  // name of the user from payload
    "channel": "",          // channel of the tenant
    "orgExternalId": "",    // orgExternalId of the linked org
    "roles": [ "" , "" ],   // roles of the user
    "userId": "",           // sunbird internal id of the user
    "organisations": {},    // linked organisations' data
    "firstName": ""         // firstName of the user in the system
  },                        
                            
  "objectType": "user"      // affected entity
}                           


APIs to be consumed:

API NameAPI EndpointUsage
Organisation Search API

<host>/api/org/v1/search

To find the organisationId of the linked organisation using orgExternalId
Private User Update API{{host}}/private/user/v1/updateTo update name, organisation associations and roles of the user