Starting gsasl integration to perform challenge response authentication. Note that gsasl 1.3 is required (previous versions are not supported). Authentication is currently broken.

This commit is contained in:
lotodore
2009-10-11 09:20:17 +00:00
parent fe627fe6f5
commit 1f7f045d15
18 changed files with 123 additions and 100 deletions
+7 -2
View File
@@ -48,6 +48,7 @@ class ChatCleanerManager;
class ServerDBInterface;
struct GameData;
class Game;
struct Gsasl;
class ServerLobbyThread : public Thread, public boost::enable_shared_from_this<ServerLobbyThread>
{
@@ -93,7 +94,7 @@ public:
u_int32_t GetNextGameId();
ServerCallback &GetCallback();
void SetGameDBId(u_int32_t gameId, db_id gameDBId);
void SetGameDBId(u_int32_t gameId, DB_id gameDBId);
AvatarManager &GetAvatarManager();
@@ -120,6 +121,8 @@ protected:
virtual void Main();
void RegisterTimers();
void CancelTimers();
void InitAuthContext();
void ClearAuthContext();
void InitChatCleaner();
void HandleRead(const boost::system::error_code &ec, SessionId sessionId, size_t bytesRead);
@@ -137,7 +140,7 @@ protected:
void InitAfterLogin(SessionWrapper session);
void EstablishSession(SessionWrapper session);
void AuthenticatePlayer(SessionWrapper session, const std::string &password);
void AuthenticationSuccess(unsigned playerId, db_id dbPlayerId);
void AuthenticationSuccess(unsigned playerId, DB_id dbPlayerId);
void AuthenticationFailure(unsigned playerId);
void RequestPlayerAvatar(SessionWrapper session);
void TimerRemoveGame(const boost::system::error_code &ec);
@@ -195,6 +198,8 @@ private:
SessionManager m_sessionManager;
SessionManager m_gameSessionManager;
Gsasl *m_authContext;
TimerClientAddressMap m_timerAvatarClientAddressMap;
mutable boost::mutex m_timerAvatarClientAddressMapMutex;