From cdccd6be3f107023295fa5da7e7073bc936fee3f Mon Sep 17 00:00:00 2001 From: lumi Date: Sat, 25 Feb 2017 03:41:50 +0100 Subject: [PATCH] the example should just use SCRAM-SHA-1 --- examples/client.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/client.rs b/examples/client.rs index 6333c0bc..36ed4af3 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -4,7 +4,7 @@ use xmpp::jid::Jid; use xmpp::client::ClientBuilder; use xmpp::plugins::messaging::{MessagingPlugin, MessageEvent}; use xmpp::plugins::presence::{PresencePlugin, Show}; -use xmpp::sasl::mechanisms::{Scram, Sha1, Plain}; +use xmpp::sasl::mechanisms::{Scram, Sha1}; use std::env; @@ -15,9 +15,7 @@ fn main() { client.register_plugin(PresencePlugin::new()); let pass = env::var("PASS").unwrap(); let name = jid.node.clone().expect("JID requires a node"); - client.connect(&mut Plain::new(name, pass)).unwrap(); - // Replace with this line if you want SCRAM-SHA-1 authentication: - // client.connect(&mut Scram::::new(name, pass).unwrap()).unwrap(); + client.connect(&mut Scram::::new(name, pass).unwrap()).unwrap(); client.bind().unwrap(); client.plugin::().set_presence(Show::Available, None).unwrap(); loop {