server expose raw client credentials

This commit is contained in:
Michael Davidsaver
2020-03-09 14:45:28 -07:00
parent a86a0db8f8
commit bcdf743ae9
6 changed files with 88 additions and 1 deletions
+13
View File
@@ -166,6 +166,19 @@ void ServerChannelControl::close()
});
}
std::pair<std::string, Value> ServerChannelControl::rawCredentials() const
{
std::pair<std::string, Value> ret;
auto serv = server.lock();
if(serv)
serv->acceptor_loop.call([this, &ret](){
if(auto chan = this->chan.lock())
if(auto conn = chan->conn.lock())
ret = std::make_pair(conn->autoMethod, conn->credentials.clone());
});
return ret;
}
void ServerConn::handle_SEARCH()
{
EvInBuf M(peerBE, segBuf.get(), 16);