From 5bca5a16b990977bf9ff8b97fa38948033a94012 Mon Sep 17 00:00:00 2001 From: Jon Kristensen Date: Wed, 13 Jun 2012 04:16:25 +0200 Subject: [PATCH] minor EchoClient modifications; exported simpleAuth started to use simpleAuth in EchoClient stripped password from EchoClient --- examples/EchoClient.hs | 13 +++++++------ source/Network/Xmpp.hs | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/EchoClient.hs b/examples/EchoClient.hs index 8fbb2be..0b1c14d 100644 --- a/examples/EchoClient.hs +++ b/examples/EchoClient.hs @@ -25,10 +25,11 @@ import Network.Xmpp.IM -- Server and authentication details. -hostName = "nejla.com" -portNumber = 5222 -userName = "jon" -password = "G2D9%b4S3" -- TODO +hostname = "nejla.com" +hostname_ = "xmpp.nejla.com" -- TODO +-- portNumber = 5222 -- TODO +userName = "" +password = "" -- TODO: Incomplete code, needs documentation, etc. @@ -36,9 +37,9 @@ main :: IO () main = do withNewSession $ do withConnection $ do - connect "xmpp.nejla.com" "nejla.com" + connect hostname_ hostname -- startTLS exampleParams - saslResponse <- auth userName password (Just "echo-client") + saslResponse <- simpleAuth userName password (Just "echo-client") case saslResponse of Right _ -> return () Left e -> error $ show e diff --git a/source/Network/Xmpp.hs b/source/Network/Xmpp.hs index e651f32..8124d11 100644 --- a/source/Network/Xmpp.hs +++ b/source/Network/Xmpp.hs @@ -35,6 +35,7 @@ module Network.Xmpp , withConnection , connect , startTLS + , simpleAuth , auth , endSession , setSessionEndHandler