diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-07-16 12:57:03 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-07-16 12:57:03 +0200 |
| commit | 7b438d389b56acd22653473ac650e8e5d6eb520f (patch) | |
| tree | acdea3dac24774944275d82c996da9cd58b75b81 /src/server/authserver/Server/AuthSession.h | |
| parent | 4fb3bbe71830b2ec53d6fd4e4e4efaada46a362a (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.h | 3 |
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; |
