Example #1
0
Status
otpResetRemove(Login &login)
{
    AutoU08Buf LP1;
    ABC_CHECK_OLD(ABC_LoginGetServerKey(login, &LP1, &error));
    ABC_CHECK_OLD(ABC_LoginServerOtpResetCancelPending(login.lobby, LP1, &error));

    return Status();
}
Example #2
0
Status
otpAuthRemove(Login &login)
{
    AutoU08Buf LP1;
    ABC_CHECK_OLD(ABC_LoginGetServerKey(login, &LP1, &error));
    ABC_CHECK_OLD(ABC_LoginServerOtpDisable(login.lobby, LP1, &error));

    return Status();
}
Example #3
0
Status
otpAuthGet(Login &login, bool &enabled, long &timeout)
{
    AutoU08Buf LP1;
    ABC_CHECK_OLD(ABC_LoginGetServerKey(login, &LP1, &error));
    ABC_CHECK_OLD(ABC_LoginServerOtpStatus(login.lobby, LP1, &enabled, &timeout, &error));

    return Status();
}
Example #4
0
Status
otpAuthSet(Login &login, long timeout)
{
    // Install a key if needed:
    if (!login.lobby.otpKey())
    {
        OtpKey random;
        ABC_CHECK(random.create());
        login.lobby.otpKeySet(random);
    }

    AutoU08Buf LP1;
    ABC_CHECK_OLD(ABC_LoginGetServerKey(login, &LP1, &error));
    ABC_CHECK_OLD(ABC_LoginServerOtpEnable(login.lobby, LP1,
        login.lobby.otpKey()->encodeBase32().c_str(), timeout, &error));

    return Status();
}
Example #5
0
/**
 * Upload files to auth server for debugging
 *
 * @param szUserName    UserName for the account associated with the settings
 * @param szPassword    Password for the account associated with the settings
 * @param pError        A pointer to the location to store the error if there is one
 */
tABC_CC ABC_LoginServerUploadLogs(const Account &account,
                                  tABC_Error *pError)
{
    tABC_CC cc = ABC_CC_Ok;
    ABC_SET_ERR_CODE(pError, ABC_CC_Ok);

    HttpReply reply;
    std::string url = ABC_SERVER_ROOT "/" ABC_SERVER_DEBUG_PATH;
    char *szPost          = NULL;
    char *szLogFilename   = NULL;
    json_t *pJSON_Root    = NULL;
    DataChunk logData;
    DataChunk watchData;
    auto ids = account.wallets.list();
    json_t *pJSON_array = NULL;

    AutoU08Buf LP1;
    ABC_CHECK_RET(ABC_LoginGetServerKey(account.login, &LP1, pError));

    ABC_CHECK_RET(ABC_DebugLogFilename(&szLogFilename, pError);)