ESET Online Help

Search English
Select the topic

Reading and Writing 2FA Data

The ESET Secure Authentication On-Prem SDK exposes the IUserStorage interface that transports data between the SDK and your database; this interface must be implemented to read and write 2FA data (see the SDK Developer Guide for details).

The interface uses two methods that must be implemented, loadUser and saveUser.

loadUser

This method uses the following input parameter:

string username - the user whose 2FA data will be retrieved
 

This method has the following return type:

string data - the 2FA data for the user
 

In other words, the supplied username must be used to return the 2FA data for that user.

saveUser

This method has the following input parameters:

string username - the user whose 2FA data you want to store

string data - the 2FA data to store

This method has no return value. In other words, the SDK will provide the username and 2FA data – make sure that this data is written to the 2FA field in your user database.