aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Server/AuthSession.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-07-16 12:57:03 +0200
committerShauren <shauren.trinity@gmail.com>2025-07-16 12:57:03 +0200
commit7b438d389b56acd22653473ac650e8e5d6eb520f (patch)
treeacdea3dac24774944275d82c996da9cd58b75b81 /src/server/authserver/Server/AuthSession.h
parent4fb3bbe71830b2ec53d6fd4e4e4efaada46a362a (diff)
Core/Authserver: Add auth session timeout - socket is closed after 10s of inactivity if not authenticated or after 1 minute if authenticated
Diffstat (limited to 'src/server/authserver/Server/AuthSession.h')
-rw-r--r--src/server/authserver/Server/AuthSession.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/authserver/Server/AuthSession.h b/src/server/authserver/Server/AuthSession.h
index 4b848e30428..400d08c5a16 100644
--- a/src/server/authserver/Server/AuthSession.h
+++ b/src/server/authserver/Server/AuthSession.h
@@ -22,6 +22,7 @@
#include "Common.h"
#include "CryptoHash.h"
#include "DatabaseEnvFwd.h"
+#include "DeadlineTimer.h"
#include "Duration.h"
#include "Optional.h"
#include "Socket.h"
@@ -92,11 +93,13 @@ private:
void RealmListCallback(PreparedQueryResult result);
bool VerifyVersion(std::span<uint8 const> a, Trinity::Crypto::SHA1::Digest const& versionProof, bool isReconnect);
+ void SetTimeout();
Optional<Trinity::Crypto::SRP6> _srp6;
SessionKey _sessionKey = {};
std::array<uint8, 16> _reconnectProof = {};
+ Trinity::Asio::DeadlineTimer _timeout;
AuthStatus _status;
AccountInfo _accountInfo;
Optional<std::vector<uint8>> _totpSecret;