gigya-node
Version:
Gigya SDK for NodeJS
67 lines • 3.46 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TFAPhone = void 0;
__exportStar(require("./interfaces/gigya-response"), exports);
__exportStar(require("./interfaces/base-params"), exports);
__exportStar(require("./interfaces/tfa"), exports);
var TFAPhone = /** @class */ (function () {
function TFAPhone(gigya) {
this.gigya = gigya;
}
/**
* This method verifies that the provided verification code matches the code in the token, and adds the phone number in the phvToken to the user's verified phones list.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413bb9ee70b21014bbc5a10ce4041860.html
*/
TFAPhone.prototype.completeVerification = function (params, options) {
return this.gigya.request('accounts.tfa.phone.completeVerification', params, options);
};
/**
* This method retrieves Gigya's PEM-encoded X.509 certificate containing an RSA public key, which can be used to verify the signature on the JWT tokens Gigya issues.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413bcd4070b21014bbc5a10ce4041860.html
*/
TFAPhone.prototype.getCertificate = function (params, options) {
return this.gigya.request('accounts.tfa.phone.getCertificate', params, options);
};
/**
* This method returns the list of phone numbers that are verified for the user.
* For security reasons, full phone numbers are not returned, instead, an obfuscated number (last 3 digits) and a unique ID are returned for each phone.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413be06570b21014bbc5a10ce4041860.html
*/
TFAPhone.prototype.getRegisteredPhoneNumbers = function (params, options) {
return this.gigya.request('accounts.tfa.phone.getRegisteredPhoneNumbers', params, options);
};
/**
* This method removes the given phone ID from the user's list of verified phone numbers.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413bf36d70b21014bbc5a10ce4041860.html
*/
TFAPhone.prototype.removePhone = function (params, options) {
return this.gigya.request('accounts.tfa.phone.removePhone', params, options);
};
// removePhone RegisterParams and phoneId: string
/**
* This method sends a crypto-random 6-digit verification code to the specified number.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413c069e70b21014bbc5a10ce4041860.html
*/
TFAPhone.prototype.sendVerificationCode = function (params, options) {
return this.gigya.request('accounts.tfa.phone.sendVerificationCode', params, options);
};
return TFAPhone;
}());
exports.TFAPhone = TFAPhone;
exports.default = TFAPhone;
//# sourceMappingURL=tfa.phone.js.map