The Open Web Device folks
...again?
LOOP
PUSH
FXA
MSISDN
TOKBOX
STUN/TURN
TELEMETRY
INPUT.MOZILLA
<script type="text/javascript">
var apiKey = "YOUR API KEY HERE";
var sessionId = "YOUR SESSION ID HERE";
var token = "YOUR TOKEN HERE";
var session = OT.initSession(apiKey, sessionId);
session.on("streamCreated", function(event) {
session.subscribe(event.stream);
});
session.connect(token, function(error) {
var publisher = OT.initPublisher();
session.publish(publisher);
});
</script>
function _verifyAssertion(aAssertion) {
// Make use of the remote verification API
// and return the verified msisdn.
// NB: This is necessary to make sure that the user
// *really* controls this phone number!
}
// Request a mobile identity assertion and force the chrome
// UI to allow the user to change a possible previous
// selection.
navigator.getMobileIdAssertion({ forceSelection: true })
.then(
(assertion) => {
_verifyAssertion(assertion)
.then(
(msisdn) => {
// Do stuff with the msisdn.
}
);
},
(error) {
// Process error.
};
);
HTTP/1.1 204 No Content
Access-Control-Expose-Headers: Hawk-Session-Token
Connection: keep-alive
Date: Tue, 26 Aug 2014 11:20:46 GMT
Hawk-Session-Token:
ca13d91d1d4b67edf0b9523a2867b3d1b74eb63823732c441992f813f9da1f76
https://wiki.mozilla.org/Loop/Architecture
https://wiki.mozilla.org/Loop/Architecture/MVP
#loop #loop-server #media
loop-services-dev@mozilla.org
dev-media@lists.mozilla.org