Authenticator code cleanup as per review
[quassel.git] / src / common / protocols / datastream / datastreampeer.cpp
index acf7a42..6a21a16 100644 (file)
@@ -124,12 +124,12 @@ void DataStreamPeer::handleHandshakeMessage(const QVariantList &mapData)
     }
 
     else if (msgType == "ClientInitAck") {
-        handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), false, m["AuthBackends"].toList())); // SupportsSsl  obsolete
+        handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), false, m["Authenticators"].toList())); // SupportsSsl obsolete
     }
 
     else if (msgType == "CoreSetupData") {
         QVariantMap map = m["SetupData"].toMap();
-        handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap(), map["AuthBackend"].toString(), map["AuthProperties"].toMap()));
+        handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap(), map["Authenticator"].toString(), map["AuthProperties"].toMap()));
     }
 
     else if (msgType == "CoreSetupReject") {
@@ -187,7 +187,7 @@ void DataStreamPeer::dispatch(const ClientRegistered &msg) {
     m["MsgType"] = "ClientInitAck";
     m["CoreFeatures"] = msg.coreFeatures;
     m["StorageBackends"] = msg.backendInfo;
-    m["AuthBackends"] = msg.authBackendInfo;
+    m["Authenticators"] = msg.authenticatorInfo;
     m["LoginEnabled"] = m["Configured"] = msg.coreConfigured;
 
     writeMessage(m);
@@ -203,8 +203,7 @@ void DataStreamPeer::dispatch(const SetupData &msg)
     map["ConnectionProperties"] = msg.setupData;
 
     // Auth backend properties.
-    // XXX: make these optional using core features.
-    map["AuthBackend"] = msg.authenticator;
+    map["Authenticator"] = msg.authenticator;
     map["AuthProperties"] = msg.authSetupData;
 
     QVariantMap m;