fix subscribe message reqression
This commit is contained in:
parent
18846bf95f
commit
0b4597444c
@ -79,8 +79,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] const char ** argv) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
CheckApplication ca;
|
CheckApplication ca;
|
||||||
auto ret =
|
auto ret = ca.call(CH, session.config().systemToken).or_else(mapError);
|
||||||
ca.call(CH, {session.config().systemToken.data(), session.config().systemToken.size()}).or_else(mapError);
|
|
||||||
if(not ret.has_value()) {
|
if(not ret.has_value()) {
|
||||||
log(LogLevel::Error, "Check Application step failed, check configration");
|
log(LogLevel::Error, "Check Application step failed, check configration");
|
||||||
return PAM_MAXTRIES;
|
return PAM_MAXTRIES;
|
||||||
|
|||||||
@ -30,8 +30,7 @@ class CoreHandler : public CoreHandlerInterface< CoreHandler< HttpHandler > > {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void signRequest(Request & request) const {
|
void signRequest(Request & request) const {
|
||||||
request.headers["X-Rublon-Signature"] =
|
request.headers["X-Rublon-Signature"] = signData(request.body, config().secretKey).c_str();
|
||||||
std::pmr::string{signData(request.body, config().secretKey).c_str(), request.headers.get_allocator()};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasSignature(const Response & response) const {
|
bool hasSignature(const Response & response) const {
|
||||||
|
|||||||
@ -136,7 +136,7 @@ class WebSocket {
|
|||||||
|
|
||||||
subscribe_message += R"msg(42["subscribe",{"channel":"transactionConfirmation.)msg";
|
subscribe_message += R"msg(42["subscribe",{"channel":"transactionConfirmation.)msg";
|
||||||
subscribe_message += transaction_id.data();
|
subscribe_message += transaction_id.data();
|
||||||
subscribe_message += "}]";
|
subscribe_message += R"(")}])";
|
||||||
|
|
||||||
memcpy(buf + LWS_PRE, subscribe_message.data(), subscribe_message.size());
|
memcpy(buf + LWS_PRE, subscribe_message.data(), subscribe_message.size());
|
||||||
|
|
||||||
|
|||||||
@ -99,8 +99,7 @@ pam_sm_authenticate(pam_handle_t * pamh, [[maybe_unused]] int flags, [[maybe_unu
|
|||||||
|
|
||||||
{
|
{
|
||||||
CheckApplication ca;
|
CheckApplication ca;
|
||||||
const auto & config = session.config();
|
const auto ret = ca.call(CH, session.config().systemToken).or_else(mapError);
|
||||||
const auto ret = ca.call(CH, config.systemToken).or_else(mapError);
|
|
||||||
if(not ret.has_value()) {
|
if(not ret.has_value()) {
|
||||||
log(LogLevel::Error, "Check Application step failed, check configration");
|
log(LogLevel::Error, "Check Application step failed, check configration");
|
||||||
return PAM_MAXTRIES;
|
return PAM_MAXTRIES;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user