X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fprotocols%2Flegacy%2Flegacypeer.cpp;h=8f53fc15d154fdbb4c46fa44f1c72cc02ccaccb1;hp=9ceb4607ee831cc68241efdaf6376636859e4431;hb=61aac1868f15babb7086d8bc6bbcff530346f438;hpb=dd69349ca91776432a4a53aa4d18dd8ef018cd26 diff --git a/src/common/protocols/legacy/legacypeer.cpp b/src/common/protocols/legacy/legacypeer.cpp index 9ceb4607..8f53fc15 100644 --- a/src/common/protocols/legacy/legacypeer.cpp +++ b/src/common/protocols/legacy/legacypeer.cpp @@ -170,12 +170,12 @@ void LegacyPeer::handleHandshakeMessage(const QVariant &msg) socket()->setProperty("UseCompression", true); #endif - handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["SupportSsl"].toBool())); + handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["AuthBackends"].toList(), m["SupportSsl"].toBool())); } else if (msgType == "CoreSetupData") { QVariantMap map = m["SetupData"].toMap(); - handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap())); + handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["AuthBackend"].toString(), map["ConnectionProperties"].toMap(), map["AuthProperties"].toMap())); } else if (msgType == "CoreSetupReject") { @@ -242,6 +242,7 @@ void LegacyPeer::dispatch(const ClientRegistered &msg) { m["MsgType"] = "ClientInitAck"; m["CoreFeatures"] = msg.coreFeatures; m["StorageBackends"] = msg.backendInfo; + m["AuthBackends"] = msg.authBackendInfo; // FIXME only in compat mode m["ProtocolVersion"] = protocolVersion; @@ -264,6 +265,11 @@ void LegacyPeer::dispatch(const SetupData &msg) map["AdminPasswd"] = msg.adminPassword; map["Backend"] = msg.backend; map["ConnectionProperties"] = msg.setupData; + + // Auth backend properties. + // XXX: make these optional using core features. + map["AuthBackend"] = msg.authenticator; + map["AuthProperties"] = msg.authSetupData; QVariantMap m; m["MsgType"] = "CoreSetupData";