Trying to make gsasl authentication work...

This commit is contained in:
lotodore
2009-10-13 21:03:32 +00:00
parent cfc11f7f89
commit b61d43859e
5 changed files with 68 additions and 28 deletions
+10 -10
View File
@@ -693,15 +693,15 @@ ServerLobbyThread::CancelTimers()
void
ServerLobbyThread::InitAuthContext()
{
int res = gsasl_init(&m_authContext);
if (res != GSASL_OK)
throw ServerException(__FILE__, __LINE__, ERR_NET_GSASL_INIT_FAILED, 0);
if (!gsasl_server_support_p(m_authContext, "SCRAM-SHA-1"))
{
gsasl_done(m_authContext);
throw ServerException(__FILE__, __LINE__, ERR_NET_GSASL_NO_SCRAM, 0);
}
int res = gsasl_init(&m_authContext);
if (res != GSASL_OK)
throw ServerException(__FILE__, __LINE__, ERR_NET_GSASL_INIT_FAILED, 0);
if (!gsasl_server_support_p(m_authContext, "SCRAM-SHA-1"))
{
gsasl_done(m_authContext);
throw ServerException(__FILE__, __LINE__, ERR_NET_GSASL_NO_SCRAM, 0);
}
}
void
@@ -969,7 +969,7 @@ ServerLobbyThread::HandleNetPacketInit(SessionWrapper session, const InitMessage
if (guestUser)
InitAfterLogin(session);
else
AuthenticatePlayer(session, authData);
AuthenticatePlayer(session, /*authData*/"testuser");
}
void