Changes

Jump to: navigation, search

CloudServices/Presence

2,336 bytes added, 15:35, 18 November 2013
General Overview
=== Applications permissions ===
XXX
A user may grant an application access to her presence updates.
 
The application must provide a redirection to Mozilla Presence service on a
door hanger page.
The page URL is https://<node>.presence.mozilla.com/<appid>/grant?redirect=<url>
where <node> and <appid> are values known by the registered application, and <url> is the
url to redirect back to.
 
The user connects to the page using her persona account and clicks on the 'accept' button.
 
Clicking on the 'accept' button performs a POST on https://<node>.presence.mozilla.com/<appid> containing the redirect url and the answer.
 
If user has accepted, Mozilla Presence generates a unique ID (UID) to
identify the user in the context of the application.
 
The user then is redirected back to <url> with an encoded UID in a <Presence-UID> header.
 
The application is responsible to store the UID and associate it with the user.
 
 
=== Presence Sidebar ===
 
 
Mozilla Presence provides a Social API sidebar with the following features:
 
- a Persona login/logout button
- three buttons to set her status. [online/offline/unavailable].
- a list of authorised applications with a [deactivate/revoke] button for
each one of them.
 
This sidebar can be activated by the user to manage her presence - the side bar
will open a web socket on ws://presence.services.mozilla.com/presence to send
status updates.
=== Status updates ===
XXXWhen Mozilla Presence gets a status update from someone, it looks up all the registered applications and sends to the one that are activated the updates. Since statuses are fetched via a web socket at ws://<node>.presence.mozilla.com/<appid>, each application gets its own messaging queue that is dequeued when the application is connected via the web socket. A status message is dropped from the queue if not consumed within an hour.
=== Live notifications ===
XXXLive notifications are a way for applications to reach out online users thatare not active in the application. Like status updates, live notifications are done via ws://presence.services.mozilla.com/presence. The application sends a notification to Mozilla Presence via a POST requestcontaining :  POST https://<node>.presence.mozilla.com/<appid>/notification  {'UID': 'userid', 'message': '<message>', 'url': '<url>'} Each user gets its own messaging queue and the  This message is then enqueued by the Presence server to a     
<!--
Confirm
927
edits

Navigation menu