mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Added bson support for user message protocol. (#99)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include "../pchheader.hpp"
|
||||
#include "../hplog.hpp"
|
||||
#include "../jsonschema/usrmsg_helpers.hpp"
|
||||
#include "../msg/json/usrmsg_json.hpp"
|
||||
#include "../bill/corebill.h"
|
||||
#include "usr.hpp"
|
||||
#include "user_session_handler.hpp"
|
||||
|
||||
namespace jusrmsg = jsonschema::usrmsg;
|
||||
namespace jusrmsg = msg::usrmsg::json;
|
||||
|
||||
namespace usr
|
||||
{
|
||||
@@ -25,9 +25,9 @@ int user_session_handler::on_connect(comm::comm_session &session) const
|
||||
|
||||
// As soon as a user connects, we issue them a challenge message. We remember the
|
||||
// challenge we issued and later verify the user's response with it.
|
||||
std::string msgstr;
|
||||
jusrmsg::create_user_challenge(msgstr, session.issued_challenge);
|
||||
session.send(msgstr);
|
||||
std::vector<uint8_t> msg;
|
||||
jusrmsg::create_user_challenge(msg, session.issued_challenge);
|
||||
session.send(msg);
|
||||
|
||||
// Set the challenge-issued value to true.
|
||||
session.challenge_status = comm::CHALLENGE_ISSUED;
|
||||
|
||||
Reference in New Issue
Block a user