gigya-node
Version:
Gigya SDK for NodeJS
53 lines • 2.8 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.TFAEmail = void 0;
__exportStar(require("./interfaces/gigya-response"), exports);
__exportStar(require("./interfaces/base-params"), exports);
__exportStar(require("./interfaces/tfa"), exports);
var TFAEmail = /** @class */ (function () {
function TFAEmail(gigya) {
this.gigya = gigya;
}
/**
* When implementing Risk Based Authentication, this method returns the list of verified emails for a user, to use in a second-factor authentication flow.
* For security reasons, obfuscated emails and a unique ID are returned and not explicit email addresses.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413b1e8a70b21014bbc5a10ce4041860.html
*/
TFAEmail.prototype.getEmails = function (params, options) {
return this.gigya.request('accounts.tfa.email.getEmails', params, options);
};
/**
* When implementing Risk Based Authentication 2-factor authentication, this method verifies that the verification code entered by the user matches the code
* that was sent to their email address (saved in a token on the Gigya server). It returns a provider assertion to be passed on to
* accounts.tfa.finalizeTFA for completing the authentication process.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413b0b7d70b21014bbc5a10ce4041860.html
*/
TFAEmail.prototype.completeVerification = function (params, options) {
return this.gigya.request('accounts.tfa.email.completeVerification', params, options);
};
/**
* When implementing Risk Based Authentication, this method sends a crypto-random 6-digit verification code to the specified email,
* as part of a two-factor authentication flow.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413b31d470b21014bbc5a10ce4041860.html
*/
TFAEmail.prototype.sendVerificationCode = function (params, options) {
return this.gigya.request('accounts.tfa.email.sendVerificationCode', params, options);
};
return TFAEmail;
}());
exports.TFAEmail = TFAEmail;
exports.default = TFAEmail;
//# sourceMappingURL=tfa.email.js.map