2014-06-07 10:30:19 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
this.EXPORTED_SYMBOLS = ["MobileIdentitySmsMtVerificationFlow"];
|
|
|
|
|
|
|
|
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|
|
|
|
|
|
|
Cu.import("resource://gre/modules/MobileIdentityCommon.jsm");
|
|
|
|
Cu.import("resource://gre/modules/MobileIdentitySmsVerificationFlow.jsm");
|
|
|
|
Cu.import("resource://gre/modules/Promise.jsm");
|
|
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
|
|
2014-07-29 05:27:03 -07:00
|
|
|
this.MobileIdentitySmsMtVerificationFlow = function(aVerificationOptions,
|
2014-06-07 10:30:19 -07:00
|
|
|
aUI,
|
|
|
|
aClient) {
|
|
|
|
|
2014-07-29 05:27:03 -07:00
|
|
|
log.debug("MobileIdentitySmsVerificationFlow ${}", aVerificationOptions);
|
2014-06-07 10:30:19 -07:00
|
|
|
|
|
|
|
MobileIdentitySmsVerificationFlow.call(this,
|
2014-07-29 05:27:03 -07:00
|
|
|
aVerificationOptions,
|
2014-06-07 10:30:19 -07:00
|
|
|
aUI,
|
|
|
|
aClient,
|
|
|
|
this.smsVerifyStrategy);
|
|
|
|
};
|
|
|
|
|
|
|
|
this.MobileIdentitySmsMtVerificationFlow.prototype = {
|
|
|
|
|
|
|
|
__proto__: MobileIdentitySmsVerificationFlow.prototype,
|
|
|
|
|
|
|
|
smsVerifyStrategy: function() {
|
|
|
|
return this.client.smsMtVerify(this.sessionToken,
|
|
|
|
this.verificationOptions.msisdn,
|
2014-07-29 05:27:03 -07:00
|
|
|
this.verificationOptions.mcc,
|
|
|
|
this.verificationOptions.mnc,
|
2014-06-07 10:30:19 -07:00
|
|
|
this.verificationOptions.external);
|
|
|
|
}
|
|
|
|
};
|