Commit f4c46c8a authored by Pekka Lundstrom's avatar Pekka Lundstrom

Added support to have user@domain as registration username

Signed-off-by: default avatarPekka Lundstrom <pekka.lundstrom@jollamobile.com>
parent e7832a71
......@@ -470,10 +470,24 @@ void Ssu::requestFinished(QNetworkReply *reply){
emit done();
}
void Ssu::sendRegistration(QString username, QString password){
void Ssu::sendRegistration(QString usernameDomain, QString password){
errorFlag = false;
QString ssuCaCertificate, ssuRegisterUrl;
QString username, domain;
// Username can include also domain, (user@domain), separate those
if (usernameDomain.contains('@')) {
// separate domain/username and set domain
username = usernameDomain.section('@', 0, 0);
domain = usernameDomain.section('@', 1, 1);
setDomain(domain);
qDebug() << "got username:" << username << "at domain:" << domain;
} else {
// No domain defined
username = usernameDomain;
}
if (!settings->contains("ca-certificate")){
setError("CA certificate for SSU not set (config key 'ca-certificate')");
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment