xbot/myirc/sasl_mechanism.cpp

28 lines
542 B
C++

#include "sasl_mechanism.hpp"
auto SaslPlain::step(std::string_view msg) -> StepResult {
if (complete_) {
return Failure{};
} else {
std::string reply;
reply += authzid_;
reply += '\0';
reply += authcid_;
reply += '\0';
reply += password_;
complete_ = true;
return std::move(reply);
}
}
auto SaslExternal::step(std::string_view msg) -> StepResult {
if (complete_) {
return Failure{};
} else {
return std::move(authzid_);
}
}