mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Complete refactor of TOTP integration
* Eliminate TOTP logic from GUI elements * Consolidate TOTP functionality under the Totp namespace * Eliminate guessing about state and encoders * Increased test cases * Add entry view column for TOTP [#2132] * General code cleanup, reduction of unnecessary steps, separation of concerns * Rename SetupTotpDialog to TotpSetupDialog for consistency
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
|
||||
class Database;
|
||||
class Group;
|
||||
namespace Totp {
|
||||
struct Settings;
|
||||
}
|
||||
|
||||
enum class EntryReferenceType
|
||||
{
|
||||
@@ -61,8 +64,7 @@ struct EntryData
|
||||
int autoTypeObfuscation;
|
||||
QString defaultAutoTypeSequence;
|
||||
TimeInfo timeInfo;
|
||||
mutable quint8 totpDigits;
|
||||
mutable quint8 totpStep;
|
||||
QSharedPointer<Totp::Settings> totpSettings;
|
||||
};
|
||||
|
||||
class Entry : public QObject
|
||||
@@ -98,9 +100,7 @@ public:
|
||||
QString password() const;
|
||||
QString notes() const;
|
||||
QString totp() const;
|
||||
QString totpSeed() const;
|
||||
quint8 totpDigits() const;
|
||||
quint8 totpStep() const;
|
||||
QSharedPointer<Totp::Settings> totpSettings() const;
|
||||
|
||||
bool hasTotp() const;
|
||||
bool isExpired() const;
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
void setNotes(const QString& notes);
|
||||
void setExpires(const bool& value);
|
||||
void setExpiryTime(const QDateTime& dateTime);
|
||||
void setTotp(const QString& seed, quint8& step, quint8& digits);
|
||||
void setTotp(QSharedPointer<Totp::Settings> settings);
|
||||
|
||||
QList<Entry*> historyItems();
|
||||
const QList<Entry*>& historyItems() const;
|
||||
|
||||
Reference in New Issue
Block a user