diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2023-05-05 12:37:13 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2023-05-05 22:12:57 +0200 |
commit | b398fedc0cfe7394ae8e9df59964620fa23a79c2 (patch) | |
tree | c05623f1a14c74ae89f72b31b0610a5432b184c3 /src/account-server/accounthandler.cpp | |
parent | ad07c93e31ec9cf6ecc508bf8df79ab62c24823e (diff) | |
download | manaserv-b398fedc0cfe7394ae8e9df59964620fa23a79c2.tar.gz manaserv-b398fedc0cfe7394ae8e9df59964620fa23a79c2.tar.bz2 manaserv-b398fedc0cfe7394ae8e9df59964620fa23a79c2.tar.xz manaserv-b398fedc0cfe7394ae8e9df59964620fa23a79c2.zip |
Added net_stellarLoginUrl configuration
The client needs to know the URL to open in the browser. The bare token
is still sent as well, which might allow the client to directly interact
with a Stellar wallet in the future.
Diffstat (limited to 'src/account-server/accounthandler.cpp')
-rw-r--r-- | src/account-server/accounthandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index a59e1aa1..2e4e5c04 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -134,6 +134,7 @@ private: std::string mUpdateHost; std::string mDataUrl; + std::string mStellarLoginUrl; using IPsToTime = std::map<int, time_t>; IPsToTime mLastLoginAttemptForIP; @@ -154,7 +155,8 @@ AccountHandler::AccountHandler(const std::string &attributesFile): mMaxCharacters(Configuration::getValue("account_maxCharacters", 3)), mRegistrationAllowed(Configuration::getBoolValue("account_allowRegister", true)), mUpdateHost(Configuration::getValue("net_defaultUpdateHost", std::string())), - mDataUrl(Configuration::getValue("net_clientDataUrl", std::string())) + mDataUrl(Configuration::getValue("net_clientDataUrl", std::string())), + mStellarLoginUrl(Configuration::getValue("net_stellarLoginUrl", std::string())) { XML::Document doc(attributesFile); xmlNodePtr node = doc.rootNode(); @@ -392,6 +394,7 @@ void AccountHandler::handleStellarLoginMessage(AccountClient &client, MessageIn reply.writeInt8(ERRMSG_OK); reply.writeString(client.stellarToken); + reply.writeString(mStellarLoginUrl + "?token=" + client.stellarToken); client.send(reply); } |