Copyright | See LICENSE file |
---|---|
License | BSD |
Maintainer | Ganesh Sittampalam <ganesh@earth.li> |
Stability | experimental |
Portability | non-portable (not tested) |
Safe Haskell | Safe |
Language | Haskell98 |
Representing HTTP Auth values in Haskell.
Right now, it contains mostly functionality needed by Browser
.
- data Authority
- = AuthBasic {
- auRealm :: String
- auUsername :: String
- auPassword :: String
- auSite :: URI
- | AuthDigest { }
- = AuthBasic {
- data Algorithm
- = AlgMD5
- | AlgMD5sess
- data Challenge
- data Qop
- headerToChallenge :: URI -> Header -> Maybe Challenge
- withAuthority :: Authority -> Request ty -> String
Documentation
data Authority
Authority
specifies the HTTP Authentication method to use for
a given domain/realm; Basic
or Digest
.
AuthBasic | |
| |
AuthDigest | |
data Algorithm
Algorithm
controls the digest algorithm to, MD5
or MD5Session
.
data Challenge
headerToChallenge :: URI -> Header -> Maybe Challenge
headerToChallenge base www_auth
tries to convert the WWW-Authenticate
header
www_auth
into a Challenge
value.
withAuthority :: Authority -> Request ty -> String
withAuthority auth req
generates a credentials value from the auth
Authority
,
in the context of the given request.
If a client nonce was to be used then this function might need to be of type ... -> BrowserAction String