Changes

Jump to: navigation, search

CloudServices/Presence

923 bytes added, 03:58, 20 November 2013
3. Applications permissions
=== 3. Applications permissions ===
Granting presence access requires user interaction to indicate to Mozilla Presence that the user wants an AppService to see their presence information. In the event that the user might have multiple identities or profiles on a single AppService, a user-meaningful string should be included in the authorization request to Mozilla Presence.
A user may grant Here's what a users interaction with an application access to her grant it presence updatesmight look like:[[File:WPPhoneOverview.jpg]]
The application must provide a redirection following steps occur in this flow:# User clicks Authorize# Authorize button posts to the Mozilla Presence service on a door hanger page. The authorization page URL is https://<node>.presence.mozilla.com/<appid>/grant?redirect=<url>where <node> and <appid> are values known by # User acknowledges the registered application, AppService they're granting and <url> allows it# User is theurl to redirect redirected back to.the AppService
The user connects to the page using her persona account and clicks on the 'accept' button.==== Technical Details ====
Clicking on the 'accept' button performs a POST on The page URL is https://<node>.presence.mozilla.com/<appid> containing /grant?redirect=<url>&id=<userstring>where <node> and <appid> are values known by the registered application, <url> is the url to redirect url back to, and <userstring> is the answeruser-meaningful string indicating that shouldusually be their login name (or something short and meaningful to distinguish multiple identities on a single AppService if applicable).
If The user has acceptedis expected to already be signed into their Firefox Account in this example, Mozilla Presence generates a unique ID (UID) otherwise they will need to first login to identify the user in the context of Prsence before seeing the applicationauthorization page.
The user then is redirected back to Authorizing the AppService performs a POST on https://<urlnode> with an encoded UID in a .presence.mozilla.com/<Presence-UIDappid> headercontaining the redirect url and the answer.
The application is responsible If user has accepted, Mozilla Presence generates a unique ID (PUID) to store identify the user in the UID and associate it with context of the userapplication.
The user then is redirected back to <url> with an encoded PUID in a <Presence-UID> header.
 
The application is responsible to store the PUID and associate it with the user.
 
The user experience on a phone might look like this:
=== 4. Presence Sidebar ===
Confirm
192
edits

Navigation menu