gigya-node
Version:
Gigya SDK for NodeJS
77 lines (76 loc) • 4.42 kB
TypeScript
import { CoreOptions } from 'request';
import Gigya from './gigya';
import { BaseTFAParams, FinalizeTFAParams, ImportTFAParams, InitTFAParams, ProvidersTFAParams, ResetTFAParams, UnregisterDeviceParams } from './interfaces/tfa';
import TFABackupCodes from './tfa.backupcodes';
import TFAEmail from './tfa.email';
import TFAPhone from './tfa.phone';
import TFAPush from './tfa.push';
import TFATotp from './tfa.totp';
export * from './interfaces/gigya-response';
export * from './interfaces/base-params';
export * from './interfaces/tfa';
export declare class TFA {
protected gigya: Gigya;
readonly email: TFAEmail;
readonly phone: TFAPhone;
readonly push: TFAPush;
readonly totp: TFATotp;
readonly backupcodes: TFABackupCodes;
constructor(gigya: 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
*/
initTFA(params: InitTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
finalizeTFA(params: FinalizeTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
getCertificate(params: BaseTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
getProviders(params: ProvidersTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
importTFA(params: ImportTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
resetTFA(params: ResetTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
deactivateProvider(params: ResetTFAParams & any, options?: CoreOptions | undefined): Promise<any>;
/**
* 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
*/
unregisterDevice(params: UnregisterDeviceParams & any, options?: CoreOptions | undefined): Promise<any>;
}
export default TFA;