aboutsummaryrefslogtreecommitdiff
path: root/src/aoapplication.h
diff options
context:
space:
mode:
authorOsmium Sorcerer <os@sof.beauty>2026-03-22 18:55:26 +0000
committerOsmium Sorcerer <os@sof.beauty>2026-03-29 22:22:25 +0000
commita124f46861d549ddc13485536962e34d80de939a (patch)
tree3553849323aa70fef1e198f3476a2abcc7adfe39 /src/aoapplication.h
parentb1ad938c37f4e175e5509f727d1033b074b134d4 (diff)
Add authentication dialog
Introduce start_auth_flow, a function invoked by typing `/auth username` in OOC. It sends an public-key authentication request to the server, starting the entire flow. The flow invoves two dialogs: to select the key, and to enter the passphrase to unlock the key. For convenience, each successful unlock also remembers the key for that username on the server, storing this in `saved_auth.json` (I chose JSON because I wanted it to stay human-editable; INI would be better, but it suffers from bad platform quirks in Qt).
Diffstat (limited to 'src/aoapplication.h')
-rw-r--r--src/aoapplication.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aoapplication.h b/src/aoapplication.h
index 548d4d0..d8d0c00 100644
--- a/src/aoapplication.h
+++ b/src/aoapplication.h
@@ -6,6 +6,7 @@
#include "discord_rich_presence.h"
#include "ext_packet.h"
#include "keyring.h"
+#include "saved_auth.h"
#include "serverdata.h"
#include "widgets/aooptionsdialog.h"
@@ -345,6 +346,8 @@ public:
ma_decoder_config mus_decoder_config;
KeyringModel keyring_model;
+ SavedAuth saved_auth;
+ QString ex_auth_username;
private:
QVector<ServerInfo> server_list;