class type key =
key is a user/password combination for a certain realm
method user :
The user name (UTF-8)
method password :
The password in cleartext (UTF-8)
method realm :
method domain :
The domain URIs defining the protection space. The domain URIs are absolute URIs. For proxy access the list must be empty.
Normally, this is just a list with one element. The URI must include the protocol scheme, the host name, the port, and a path (at minimum "/"). The key is valid for all request URIs for which this domain string is a prefix of the request URI. Examples: "http://localhost:80/" would cover all of "localhost". "http://localhost:80/space/" would cover all URIs at this or below this URI. "https://localhost:443/" would cover all of "localhost" when accessed via TLS.
If the key is applicable to all domains, set this to .
method credentials :
(string * string * (string * string) list) list
The key in the common "credentials" format that is used by
generic mechanisms. See
Note that since Ocamlnet-4.1 we explicitly specify that cleartext passwords are encoded in UTF-8 - independently of what the protocol assumes.