diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-26 07:50:11 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-26 07:50:11 +0000 |
| commit | 821ac0b4dbeccd98d4483efcafecd82efbd55d8f (patch) | |
| tree | 539886b8fb08ee65d3ccdff2ec110cabc6b3cee6 /src/QXmppIncomingClient.cpp | |
| parent | 7aefcf239b4534574cda290132175afc8d56189a (diff) | |
| download | qxmpp-821ac0b4dbeccd98d4483efcafecd82efbd55d8f.tar.gz | |
rework QXmppPasswordChecker
Diffstat (limited to 'src/QXmppIncomingClient.cpp')
| -rw-r--r-- | src/QXmppIncomingClient.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/QXmppIncomingClient.cpp b/src/QXmppIncomingClient.cpp index e66b893f..6a2e5c49 100644 --- a/src/QXmppIncomingClient.cpp +++ b/src/QXmppIncomingClient.cpp @@ -146,7 +146,7 @@ void QXmppIncomingClient::handleStream(const QDomElement &streamElement) { QList<QXmppConfiguration::SASLAuthMechanism> mechanisms; mechanisms << QXmppConfiguration::SASLPlain; - if (d->passwordChecker->hasPasswords()) + if (d->passwordChecker->hasGetPassword()) mechanisms << QXmppConfiguration::SASLDigestMD5; features.setAuthMechanisms(mechanisms); } @@ -183,7 +183,7 @@ void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv) const QString username = QString::fromUtf8(auth[1]); const QString password = QString::fromUtf8(auth[2]); - if (d->passwordChecker && d->passwordChecker->checkCredentials(username, password)) + if (d->passwordChecker && d->passwordChecker->checkPassword(username, password)) { d->username = username; sendData("<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>"); @@ -314,7 +314,7 @@ void QXmppIncomingClient::slotTimeout() /// Retrieves the password for the given username. /// -/// Reimplement this method to support DIGEST-MD5 authentication. +/// You need to reimplement this method to support DIGEST-MD5 authentication. /// /// \param username /// \param password @@ -326,12 +326,10 @@ bool QXmppPasswordChecker::getPassword(const QString &username, QString &passwor return false; } -/// Returns true if it is possible to retrieve passwords. +/// Returns true if the getPassword() method is implemented. /// -/// Reimplement this method and return true if you provided a -/// getPassword() method. -bool QXmppPasswordChecker::hasPasswords() const +bool QXmppPasswordChecker::hasGetPassword() const { return false; } |
