Ejemplo n.º 1
0
void mumlib::Transport::sendAuthentication() {
    string user, password;
    tie(user, password) = credentials;

    MumbleProto::Authenticate authenticate;
    authenticate.set_username(user);
    authenticate.set_password(password);
    authenticate.clear_celt_versions();
    authenticate.clear_tokens();
    authenticate.set_opus(true);

    logger.info("Sending authententication.");

    sendControlMessagePrivate(MessageType::AUTHENTICATE, authenticate);
}
Ejemplo n.º 2
0
void MumbleClient::authenticate()
{
    qDebug() << "authenticating...";
    MumbleProto::Authenticate auth;

    int rand_len = 4;
    char rand[5];
    genRandomStr(rand,rand_len);
    QString username = "******";
    username += QString::fromLocal8Bit(rand);

    //auth.set_username(username.toStdString().c_str());
    auth.set_username(_settings->_radio_id.toStdString().c_str());
    auth.set_password("");
    auth.set_opus(true);
    int size = auth.ByteSize();
    quint8 data[size];
    auth.SerializeToArray(data,size);
    quint16 type = 2;
    this->sendMessage(data,type,size);
    _authenticated = true;
}