Changes

Jump to: navigation, search

CloudServices/Presence

1,046 bytes added, 13:14, 18 November 2013
Online status updates
# let an application send a live notification and a user receive it.
=== 1. Online status updates ===
XXXMozilla Presence provides a web socket endpoint at '''ws://presence.services.mozilla.com/presence''' The user may connect to the socket using a valid Persona assertion, and send status updates. The data must be sent in JSON. Example:  {'email': 'tarek@mozilla.com', 'assertion': 'valid persona assertion', 'status': 'online'} The status value must be one of "online", "offline" or "unavailable" For every status 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:  {'result': 'KO', 'errno': 34, 'error': 'Invalid assertion'} The user can send as many updates as it wants, but the server can ask it to slow down with a specific error code (codes to be documented) The server or the user can disconnect from the socket at any time and for any reason.The number of socket connections is limited to one connection per device and per email.
=== Applications permissions ===
Confirm
927
edits

Navigation menu