diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2011-03-29 13:20:14 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2011-03-29 13:20:14 +0000 |
| commit | 75a0cb2036ebd6c1913caec6d4d9c4497481ec2f (patch) | |
| tree | 2119507630d04f09c90fe05138e866fa3c88ba69 /examples/example_8_server | |
| parent | 4f738fbb73b3b15b6022635b78dac71f91909cd0 (diff) | |
refactor SASL authentication to allow server-side password checkers which natively support MD5
Diffstat (limited to 'examples/example_8_server')
| -rw-r--r-- | examples/example_8_server/main.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
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; |
