Changes

Jump to: navigation, search

CloudServices/Presence

487 bytes added, 13:52, 21 January 2014
1. Device Channel to Mozilla Presence
devices to connect to.
The user may connect to the socket using a valid FxA (which will entail a BrowserID Assertion per FxaSSO), and send status updates. The data must be sent in JSON.
The data must be sent in JSON and is based on a lose protocol where they are two mandatory fields:
 
- '''assertion''' : a valid persona assertion
- '''type''' : the type of request. so far we have "visibility" and "status" - everything else will be rejected
Mozilla Presence does not retain a list of applications authorized to see updates, this
Example:
{'type': 'appvisibilityvisibility', 'application_ids': [421, 492, 9592, 391], 'assertion': 'valid persona assertion'
Status updates
 
Example:
{'emailtype': 'tarek@mozilla.comstatus',
'assertion': 'valid persona assertion',
'status': 'online'}
The status value must be one of "online", "offline" or , "unavailable". In case the device wants to send a status update to a specific subsetof applications, it can use the 'application_ids' key on a status updaterequest, it will override the value set on a visibility call, just forthat call.
For every status request received, the server sends back an ACK message.
Example:
{'result': 'OK'}
In case of an error, the server may send back an extra 'errno' field with an error code (codes to be documented)and an optional 'error' message.
Example:
Confirm
927
edits

Navigation menu