From 75a0cb2036ebd6c1913caec6d4d9c4497481ec2f Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Tue, 29 Mar 2011 13:20:14 +0000 Subject: refactor SASL authentication to allow server-side password checkers which natively support MD5 --- examples/example_8_server/main.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'examples/example_8_server/main.cpp') diff --git a/examples/example_8_server/main.cpp b/examples/example_8_server/main.cpp index 8dadcc18..ed1f814e 100644 --- a/examples/example_8_server/main.cpp +++ b/examples/example_8_server/main.cpp @@ -32,18 +32,11 @@ class passwordChecker : public QXmppPasswordChecker { - /// Checks that the given credentials are valid. - QXmppPasswordChecker::Error checkPassword(const QString &username, const QString &password) - { - if (username == USERNAME && password == PASSWORD) - return QXmppPasswordChecker::NoError; - else - return QXmppPasswordChecker::AuthorizationError; - }; - /// Retrieves the password for the given username. - bool getPassword(const QString &username, QString &password) + bool getPassword(const QString &username, const QString &domain, QString &password) { + Q_UNUSED(domain); + if (username == USERNAME) { password = PASSWORD; -- cgit v1.2.3