gigya-node
Version:
Gigya SDK for NodeJS
106 lines • 5.47 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.TFA = void 0;
var tfa_backupcodes_1 = require("./tfa.backupcodes");
var tfa_email_1 = require("./tfa.email");
var tfa_phone_1 = require("./tfa.phone");
var tfa_push_1 = require("./tfa.push");
var tfa_totp_1 = require("./tfa.totp");
__exportStar(require("./interfaces/gigya-response"), exports);
__exportStar(require("./interfaces/base-params"), exports);
__exportStar(require("./interfaces/tfa"), exports);
var TFA = /** @class */ (function () {
function TFA(gigya) {
this.gigya = gigya;
this.email = new tfa_email_1.default(gigya);
this.phone = new tfa_phone_1.default(gigya);
this.push = new tfa_push_1.default(gigya);
this.totp = new tfa_totp_1.default(gigya);
this.backupcodes = new tfa_backupcodes_1.default(gigya);
}
/**
* This method initializes two-factor authentication (TFA) by returning a JWT token that can be used to register with a new provider,
* or to verify the user using an existing provider, or to edit an existing provider.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413ba6e870b21014bbc5a10ce4041860.html
*/
TFA.prototype.initTFA = function (params, options) {
return this.gigya.request('accounts.tfa.initTFA', params, options);
};
/**
* This method finalizes the two-factor authentication (TFA) flow that started with accounts.tfa.initTFA..
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413b44d170b21014bbc5a10ce4041860.html
*/
TFA.prototype.finalizeTFA = function (params, options) {
return this.gigya.request('accounts.tfa.finalizeTFA', 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/413b57d970b21014bbc5a10ce4041860.html
*/
TFA.prototype.getCertificate = function (params, options) {
return this.gigya.request('accounts.tfa.getCertificate', params, options);
};
/**
* This method retrieves the two-factor authentication (TFA) providers for a site and user.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413b6ced70b21014bbc5a10ce4041860.html
*/
TFA.prototype.getProviders = function (params, options) {
return this.gigya.request('accounts.tfa.getProviders', params, options);
};
/**
* This method takes specified phones and adds them to a specified user's verified phone numbers.
* If this is the first phone added to this user it will also enable the provider.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413b800070b21014bbc5a10ce4041860.html
*/
TFA.prototype.importTFA = function (params, options) {
return this.gigya.request('accounts.tfa.importTFA', params, options);
};
/**
* This method resets the means of identification (e.g., SMS or authenticating app) used as the second step of authentication in a TFA flow
* for a specified user. The user will be prompted to enter a new verification method on their next login.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413c65da70b21014bbc5a10ce4041860.html
*/
TFA.prototype.resetTFA = function (params, options) {
return this.gigya.request('accounts.tfa.resetTFA', params, options);
};
/**
* This method deactivates a provider for the user across all devices.
* This method may only be called when the user is fully logged in (not in any "pending state").
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413af46770b21014bbc5a10ce4041860.html
*/
TFA.prototype.deactivateProvider = function (params, options) {
return this.gigya.request('accounts.tfa.deactivateProvider', params, options);
};
/**
* This method unregisters devices from the list of verified devices for the user, used in Risk-Based Authentication flows.
* A verified device is a device (phone or web browser) that has already been verified with an SMS, TOTP, or email verification code.
* The method may unregister all devices, or those with an active session.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413cc8e070b21014bbc5a10ce4041860.html
*/
TFA.prototype.unregisterDevice = function (params, options) {
return this.gigya.request('accounts.tfa.unregisterDevice', params, options);
};
return TFA;
}());
exports.TFA = TFA;
exports.default = TFA;
//# sourceMappingURL=tfa.js.map