diff options
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
| -rw-r--r-- | Swiften/Client/ClientSession.cpp | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index 7fdb8ac..a255cef 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -29,6 +29,7 @@  #include "Swiften/Elements/ResourceBind.h"  #include "Swiften/SASL/PLAINClientAuthenticator.h"  #include "Swiften/SASL/SCRAMSHA1ClientAuthenticator.h" +#include "Swiften/SASL/DIGESTMD5ClientAuthenticator.h"  #include "Swiften/Session/SessionStream.h"  namespace Swift { @@ -107,6 +108,14 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {  				state = WaitingForCredentials;  				onNeedCredentials();  			} +			else if (streamFeatures->hasAuthenticationMechanism("DIGEST-MD5")) { +				std::ostringstream s; +				s << boost::uuids::random_generator()(); +				// FIXME: Host should probably be the actual host +				authenticator = new DIGESTMD5ClientAuthenticator(localJID.getDomain(), s.str()); +				state = WaitingForCredentials; +				onNeedCredentials(); +			}  			else if (streamFeatures->hasAuthenticationMechanism("PLAIN")) {  				authenticator = new PLAINClientAuthenticator();  				state = WaitingForCredentials;  | 
 Swift