WebAPI/MobileIdentity

< WebAPI
Revision as of 16:06, 11 July 2014 by Ferjm (talk | contribs) (Created page with "= Mobile Identity API = The Mobile Identity WebAPI enables web application authors to obtain a verified phone number ([http://en.wikipedia.org/wiki/MSISDN MSISDN]) after the u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mobile Identity API

The Mobile Identity WebAPI enables web application authors to obtain a verified phone number (MSISDN) after the user selected the number to be shared and gave explicit permission to the app to obtain it.

DOM API

 dictionary MobileIdOptions {
   boolean forceSelection = false;
 };
 partial interface Navigator {
   Promise getMobileIdAssertion(optional MobileIdOptions options);
 };

The returned Promise will be resolved with a verifiable BrowserId assertion containing the user's phone number as the verifiedMSISDN field or it will be rejected with a DOMError object containing one of the following error strings:

  • OFFLINE
  • DIALOG_CLOSED_BY_USER

Permission model

The API is exposed to Firefox OS privileged and certified applications that should list the mobileid permission in their manifests. The user needs to provide explicit permission to the origin requesting the phone number. This permission is given through the user agent chrome UI and it is remembered per origin by default.

 
Mobile Identity Firefox OS dialog

Code example

Implementation details

Current status

Implemented and enabled in Firefox OS 2.0 and allowed for certified and privileged apps.

Tracking bugs

bug 1021594

High level architecture