TrinityCore
Loading...
Searching...
No Matches
AuthSession Struct Referencefinal

#include <AuthSession.h>

+ Inheritance diagram for AuthSession:

Public Member Functions

 AuthSession (Trinity::Net::IoContextTcpSocket &&socket)
 
void Start () override
 
bool Update () override
 
void SendPacket (ByteBuffer &packet)
 
Trinity::Net::SocketReadCallbackResult ReadHandler () override
 
void QueueQuery (QueryCallback &&queryCallback)
 
- Public Member Functions inherited from Trinity::Net::Socket< Stream >
template<typename... Args>
 Socket (IoContextTcpSocket &&socket, Args &&... args)
 
template<typename... Args>
 Socket (boost::asio::io_context &context, Args &&... args)
 
 Socket (Socket const &other)=delete
 
 Socket (Socket &&other)=delete
 
Socketoperator= (Socket const &other)=delete
 
Socketoperator= (Socket &&other)=delete
 
virtual ~Socket ()
 
boost::asio::ip::address const & GetRemoteIpAddress () const
 
uint16 GetRemotePort () const
 
template<SocketReadCallback Callback>
void AsyncRead (Callback &&callback)
 
void QueuePacket (MessageBuffer &&buffer)
 
bool IsOpen () const
 
void CloseSocket ()
 
void DelayedCloseSocket ()
 Marks the socket for closing after write buffer becomes empty.
 
MessageBufferGetReadBuffer ()
 
Stream & underlying_stream ()
 

Public Attributes

uint32 BattlegroupID = 0
 
uint32 LoginServerType = 0
 
uint32 RealmID = 0
 
uint32 Build = 0
 
std::array< uint8, 4 > LocalChallenge = {}
 
uint32 LoginServerID = 0
 
uint32 RegionID = 0
 
uint64 DosResponse = 0
 
Trinity::Crypto::SHA1::Digest Digest = {}
 
std::string Account
 
ByteBuffer AddonInfo
 

Private Types

using AuthSocket = Socket
 

Private Member Functions

bool HandleLogonChallenge ()
 
bool HandleLogonProof ()
 
bool HandleReconnectChallenge ()
 
bool HandleReconnectProof ()
 
bool HandleRealmList ()
 
bool HandleXferAccept ()
 
bool HandleXferResume ()
 
bool HandleXferCancel ()
 
void LogonChallengeCallback (PreparedQueryResult result)
 
void ReconnectChallengeCallback (PreparedQueryResult result)
 
void RealmListCallback (PreparedQueryResult result)
 
bool VerifyVersion (std::span< uint8 const > a, Trinity::Crypto::SHA1::Digest const &versionProof, bool isReconnect)
 
void SetTimeout ()
 

Private Attributes

friend AuthHandlerTable
 
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
 
LocaleConstant _locale
 
uint32 _os
 
std::string_view _ipCountry
 
uint16 _build
 
uint8 _expversion
 
Minutes _timezoneOffset
 
QueryCallbackProcessor _queryProcessor
 

Additional Inherited Members

- Protected Member Functions inherited from Trinity::Net::Socket< Stream >
virtual void OnClose ()
 
bool AsyncProcessQueue ()
 
void SetNoDelay (bool enable)
 

Detailed Description

Definition at line 64 of file AuthSession.h.

Member Typedef Documentation

◆ AuthSocket

Definition at line 66 of file AuthSession.h.

Constructor & Destructor Documentation

◆ AuthSession()

AuthSession::AuthSession ( Trinity::Net::IoContextTcpSocket &&  socket)

Definition at line 203 of file AuthSession.cpp.

Member Function Documentation

◆ HandleLogonChallenge()

bool AuthSession::HandleLogonChallenge ( )
private

Definition at line 294 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleLogonProof()

bool AuthSession::HandleLogonProof ( )
private

Definition at line 460 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleRealmList()

bool AuthSession::HandleRealmList ( )
private

Definition at line 723 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleReconnectChallenge()

bool AuthSession::HandleReconnectChallenge ( )
private

Definition at line 625 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleReconnectProof()

bool AuthSession::HandleReconnectProof ( )
private

Definition at line 678 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleXferAccept()

bool AuthSession::HandleXferAccept ( )
private

Definition at line 831 of file AuthSession.cpp.

+ Here is the caller graph for this function:

◆ HandleXferCancel()

bool AuthSession::HandleXferCancel ( )
private

Definition at line 847 of file AuthSession.cpp.

+ Here is the caller graph for this function:

◆ HandleXferResume()

bool AuthSession::HandleXferResume ( )
private

Definition at line 839 of file AuthSession.cpp.

+ Here is the caller graph for this function:

◆ LogonChallengeCallback()

void AuthSession::LogonChallengeCallback ( PreparedQueryResult  result)
private

Definition at line 321 of file AuthSession.cpp.

+ Here is the call graph for this function:

◆ QueueQuery()

void AuthSession::QueueQuery ( QueryCallback &&  queryCallback)

Definition at line 276 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadHandler()

Trinity::Net::SocketReadCallbackResult AuthSession::ReadHandler ( )
overridevirtual

Reimplemented from Trinity::Net::Socket< Stream >.

Definition at line 232 of file AuthSession.cpp.

+ Here is the call graph for this function:

◆ RealmListCallback()

void AuthSession::RealmListCallback ( PreparedQueryResult  result)
private

Definition at line 735 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReconnectChallengeCallback()

void AuthSession::ReconnectChallengeCallback ( PreparedQueryResult  result)
private

Definition at line 652 of file AuthSession.cpp.

+ Here is the call graph for this function:

◆ SendPacket()

void AuthSession::SendPacket ( ByteBuffer packet)

Definition at line 281 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTimeout()

void AuthSession::SetTimeout ( )
private

Definition at line 885 of file AuthSession.cpp.

+ Here is the caller graph for this function:

◆ Start()

void AuthSession::Start ( )
overridevirtual

Reimplemented from Trinity::Net::Socket< Stream >.

Definition at line 209 of file AuthSession.cpp.

+ Here is the call graph for this function:

◆ Update()

bool AuthSession::Update ( )
overridevirtual

Reimplemented from Trinity::Net::Socket< Stream >.

Definition at line 222 of file AuthSession.cpp.

+ Here is the call graph for this function:

◆ VerifyVersion()

bool AuthSession::VerifyVersion ( std::span< uint8 const >  a,
Trinity::Crypto::SHA1::Digest const &  versionProof,
bool  isReconnect 
)
private

Definition at line 855 of file AuthSession.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _accountInfo

AccountInfo AuthSession::_accountInfo
private

Definition at line 104 of file AuthSession.h.

◆ _build

uint16 AuthSession::_build
private

Definition at line 109 of file AuthSession.h.

◆ _expversion

uint8 AuthSession::_expversion
private

Definition at line 110 of file AuthSession.h.

◆ _ipCountry

std::string_view AuthSession::_ipCountry
private

Definition at line 108 of file AuthSession.h.

◆ _locale

LocaleConstant AuthSession::_locale
private

Definition at line 106 of file AuthSession.h.

◆ _os

uint32 AuthSession::_os
private

Definition at line 107 of file AuthSession.h.

◆ _queryProcessor

QueryCallbackProcessor AuthSession::_queryProcessor
private

Definition at line 113 of file AuthSession.h.

◆ _reconnectProof

std::array<uint8, 16> AuthSession::_reconnectProof = {}
private

Definition at line 100 of file AuthSession.h.

◆ _sessionKey

SessionKey AuthSession::_sessionKey = {}
private

Definition at line 99 of file AuthSession.h.

◆ _srp6

Optional<Trinity::Crypto::SRP6> AuthSession::_srp6
private

Definition at line 98 of file AuthSession.h.

◆ _status

AuthStatus AuthSession::_status
private

Definition at line 103 of file AuthSession.h.

◆ _timeout

Trinity::Asio::DeadlineTimer AuthSession::_timeout
private

Definition at line 102 of file AuthSession.h.

◆ _timezoneOffset

Minutes AuthSession::_timezoneOffset
private

Definition at line 111 of file AuthSession.h.

◆ _totpSecret

Optional<std::vector<uint8> > AuthSession::_totpSecret
private

Definition at line 105 of file AuthSession.h.

◆ Account

std::string AuthSession::Account

Definition at line 241 of file WorldSocket.cpp.

◆ AddonInfo

ByteBuffer AuthSession::AddonInfo

Definition at line 242 of file WorldSocket.cpp.

◆ AuthHandlerTable

friend AuthSession::AuthHandlerTable
private

Definition at line 81 of file AuthSession.h.

◆ BattlegroupID

uint32 AuthSession::BattlegroupID = 0

Definition at line 232 of file WorldSocket.cpp.

◆ Build

uint32 AuthSession::Build = 0

Definition at line 235 of file WorldSocket.cpp.

◆ Digest

Trinity::Crypto::SHA1::Digest AuthSession::Digest = {}

Definition at line 240 of file WorldSocket.cpp.

◆ DosResponse

uint64 AuthSession::DosResponse = 0

Definition at line 239 of file WorldSocket.cpp.

◆ LocalChallenge

std::array<uint8, 4> AuthSession::LocalChallenge = {}

Definition at line 236 of file WorldSocket.cpp.

◆ LoginServerID

uint32 AuthSession::LoginServerID = 0

Definition at line 237 of file WorldSocket.cpp.

◆ LoginServerType

uint32 AuthSession::LoginServerType = 0

Definition at line 233 of file WorldSocket.cpp.

◆ RealmID

uint32 AuthSession::RealmID = 0

Definition at line 234 of file WorldSocket.cpp.

◆ RegionID

uint32 AuthSession::RegionID = 0

Definition at line 238 of file WorldSocket.cpp.


The documentation for this struct was generated from the following files: