xbot/sasl_mechanism.cpp

28 lines
584 B
C++
Raw Normal View History

2025-01-25 12:25:38 -08:00
#include "sasl_mechanism.hpp"
auto SaslPlain::step(std::string_view msg) -> std::optional<std::string> {
if (complete_) {
return std::nullopt;
} else {
std::string reply;
reply += authzid_;
reply += '\0';
reply += authcid_;
reply += '\0';
reply += password_;
complete_ = true;
return {std::move(reply)};
}
}
2025-01-28 20:01:51 -08:00
auto SaslExternal::step(std::string_view msg) -> std::optional<std::string> {
if (complete_) {
return std::nullopt;
} else {
return {std::move(authzid_)};
}
}