Revert "added login window #4168"

This reverts commit ccc5834757.
This commit is contained in:
XinyuHou
2015-02-05 11:44:33 +00:00
parent c25b6a8bf6
commit 097f4c4c1f
14 changed files with 17 additions and 589 deletions

View File

@@ -160,20 +160,17 @@ ArgParser::parsePlatformArg(ArgsBase& argsBase, const int& argc, const char* con
bool
ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
{
bool result = false;
for (int i = 1; i < argc; ++i) {
if (isArg(i, argc, argv, NULL, "--get-active-desktop", 0)) {
args.m_printActiveDesktopName = true;
result = true;
return true;
}
if (isArg(i, argc, argv, NULL, "--login-auth", 0)) {
args.m_loginAuthenticate = true;
result = true;
else {
return false;
}
}
return result;
return false;
}
bool

View File

@@ -29,8 +29,6 @@
#include "platform/MSWindowsSession.h"
#endif
#define PREMIUM_AUTH_URL "https://synergy-project.org/premium/json/auth/"
enum {
kErrorOk,
kErrorArgs,
@@ -67,9 +65,6 @@ ToolApp::run(int argc, char** argv)
}
#endif
}
else if (m_args.m_loginAuthenticate) {
loginAuth();
}
else {
throw XSynergy("Nothing to do");
}
@@ -90,21 +85,3 @@ void
ToolApp::help()
{
}
void
ToolApp::loginAuth()
{
String credentials;
std::cin >> credentials;
size_t separator = credentials.find(':');
String email = credentials.substr(0, separator);
String password = credentials.substr(separator + 1, credentials.length());
std::stringstream ss;
ss << PREMIUM_AUTH_URL;
ss << "?email=" << ARCH->internet().urlEncode(email);
ss << "&password=" << password;
std::cout << ARCH->internet().get(ss.str()) << std::endl;
}

View File

@@ -26,10 +26,6 @@ class ToolApp : public MinimalApp
public:
UInt32 run(int argc, char** argv);
void help();
private:
void loginAuth();
private:
ToolArgs m_args;
};

View File

@@ -25,5 +25,4 @@ public:
public:
bool m_printActiveDesktopName;
bool m_loginAuthenticate;
};