Browse Source

Remove simpleAuth

master
Jon Kristensen 13 years ago
parent
commit
2fe8c66d4d
  1. 1
      source/Network/Xmpp/Internal.hs
  2. 17
      source/Network/Xmpp/Sasl.hs

1
source/Network/Xmpp/Internal.hs

@ -24,7 +24,6 @@ module Network.Xmpp.Internal
, openStream , openStream
, withStream , withStream
, startTls , startTls
, simpleAuth
, auth , auth
, pushStanza , pushStanza
, pullStanza , pullStanza

17
source/Network/Xmpp/Sasl.hs

@ -12,7 +12,6 @@ module Network.Xmpp.Sasl
, scramSha1 , scramSha1
, plain , plain
, auth , auth
, simpleAuth
) where ) where
import Control.Applicative import Control.Applicative
@ -98,22 +97,6 @@ auth mechanisms resource con = runErrorT $ do
lift $ startSession con lift $ startSession con
return Nothing return Nothing
-- | Authenticate to the server with the given username and password
-- and bind a resource.
--
-- Prefers SCRAM-SHA1 over DIGEST-MD5.
simpleAuth :: Text.Text -- ^ The username
-> Text.Text -- ^ The password
-> Maybe Text -- ^ The desired resource or 'Nothing' to let the
-- server assign one
-> TMVar Stream
-> IO (Either XmppFailure (Maybe AuthFailure))
simpleAuth username passwd resource = flip auth resource $
[ -- TODO: scramSha1Plus
scramSha1 username Nothing passwd
, digestMd5 username Nothing passwd
]
-- Produces a `bind' element, optionally wrapping a resource. -- Produces a `bind' element, optionally wrapping a resource.
bindBody :: Maybe Text -> Element bindBody :: Maybe Text -> Element
bindBody = pickleElem $ bindBody = pickleElem $

Loading…
Cancel
Save