mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-01 16:13:19 -04:00
the response should never be empty but we need to check the json lib for exceptions and return appropriately... + cleanup a bit - closes #33
This commit is contained in:
@@ -192,23 +192,16 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
|
||||
std::string response = webAPI::simplePost(authURL, std::string(postBuf.str()), "");
|
||||
|
||||
if (!response.empty())
|
||||
if (response == "success")
|
||||
{
|
||||
if (response == "success")
|
||||
{
|
||||
authOK = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorMessage err("Login Failed", response);
|
||||
this->send(err, true);
|
||||
}
|
||||
authOK = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorMessage err("Login Failed", "Error connecting to authentication provider.");
|
||||
ErrorMessage err("Login Failed", response);
|
||||
this->send(err, true);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user