X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FAuthentication.hs;h=29ae0e92bc1b9752850a7ce8dd342df78fa6203a;hb=fffa09842d060c7d738084125dea07783d84aefe;hp=3f8d76297169aeaa074c70310d7773af988ddff2;hpb=9668dc27a02b59d7bfb1e9e40af3d2619700ad69;p=Lucu.git diff --git a/Network/HTTP/Lucu/Authentication.hs b/Network/HTTP/Lucu/Authentication.hs index 3f8d762..29ae0e9 100644 --- a/Network/HTTP/Lucu/Authentication.hs +++ b/Network/HTTP/Lucu/Authentication.hs @@ -2,7 +2,7 @@ OverloadedStrings , UnicodeSyntax #-} --- |HTTP Authentication +-- |An internal module for HTTP authentication. module Network.HTTP.Lucu.Authentication ( AuthChallenge(..) , AuthCredential(..) @@ -11,7 +11,7 @@ module Network.HTTP.Lucu.Authentication , Password , printAuthChallenge - , authCredentialP + , authCredential ) where import Control.Monad @@ -27,7 +27,7 @@ import Prelude.Unicode -- |Authentication challenge to be sent to clients with -- \"WWW-Authenticate\" header field. See --- 'Network.HTTP.Lucu.Resource.setWWWAuthenticate'. +-- 'Network.HTTP.Lucu.setWWWAuthenticate'. data AuthChallenge = BasicAuthChallenge !Realm deriving (Eq) @@ -36,8 +36,7 @@ data AuthChallenge type Realm = Ascii -- |Authorization credential to be sent by client with --- \"Authorization\" header. See --- 'Network.HTTP.Lucu.Resource.getAuthorization'. +-- \"Authorization\" header. See 'Network.HTTP.Lucu.getAuthorization'. data AuthCredential = BasicAuthCredential !UserID !Password deriving (Show, Eq) @@ -55,8 +54,8 @@ printAuthChallenge (BasicAuthChallenge realm) A.toAsciiBuilder "Basic realm=" ⊕ quoteStr realm -- |'Parser' for an 'AuthCredential'. -authCredentialP ∷ Parser AuthCredential -authCredentialP +authCredential ∷ Parser AuthCredential +authCredential = do void $ string "Basic" skipMany1 lws b64 ← takeWhile1 base64