20 lines
396 B
C++
20 lines
396 B
C++
|
#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)};
|
||
|
}
|
||
|
}
|