-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | HTTP authorization (both basic and digest) done right -- -- Multiple challenges aren't implemented. Authentication-Info header -- isn't either. @package http-client-auth @version 0.1.0.0 module Network.HTTP.Client.Auth -- | This is the main function. It sends a request, gets the response, and, -- if this response requires authorization, it sends the same request -- again, now including authorization data (user-supplied login and -- password). requestWithAuth :: String -> String -> (Request (ResourceT IO) -> IO (Response body)) -> Request (ResourceT IO) -> MaybeT IO (Response body) -- | This is an abstract type representing the challenge sent by the -- server. data Challenge -- | Realm is the only thing users are supposed to know about the -- challenge. realm :: Challenge -> Maybe String -- | This function parses the response headers to get the challenge. It -- failes if there is some challenge, but it can't be parsed. If there is -- no challenge at all, function doesn't fail. getChallenge :: Response body -> Maybe Challenge -- | This function creates a string that should be sent in the -- Authorization header. makeRequestHeader :: Monad m => String -> String -> String -> Request m -> Challenge -> MaybeT m String -- | This function extracts a WWW-Authenticate header from the response. extractAuthHeader :: Response body -> Maybe String -- | This function parses the WWW-Authenticate header line to get a -- challenge. If it fails, it's probably because the header is malformed parseChallenge :: String -> Maybe Challenge -- | This function extracts URI part from the request. It wouldn't include -- the host name. makeRequestUri :: Request m -> String -- | This function makes an MD5 hash of the request body makeRequestBodyHash :: Monad m => Request m -> m String instance Show a => Show (Once a) instance Show BasicChallenge instance Show DigestAlgorithm instance Show QopValue instance Show MDigestChallenge instance Show DigestChallenge instance Show Challenge instance Monoid QopValue instance Monoid MDigestChallenge instance Monoid (Once a)