class type auth_session =
auth_session represents an authenticated session
method auth_scheme :
The authentication scheme, e.g. "basic"
method auth_domain :
Neturl.url list * int
The list of domain URIs defines the protection space. For requests of the same protection space the mechanism may perform re-authentication. Setting this to  disables re-authentication.
The integer is the transport layer ID.
method auth_realm :
method auth_user :
The user identifier (UTF-8)
method authenticate :
bool -> (string * string) list auth_status
Returns a list of additional headers that will authenticate
the passed call for this session. (This is usually only one
If a re-authentication needs to be done, the call does not contain
any authentication information. If the call is authenticated
in reaction to a 401 status, the response header contains
The bool says whether this is the re-authentication path.
method auth_session_id :
An optional ID which is only needed for multi-step authentication
protocols (i.e. which require more than one challenge/response step).
This is ID is first
retrieved after a successful
authenticate. After a re-authentication
the ID may change.
method invalidate :
http_call -> unit
The session is notified that authentication failed. (This method is not called for failed re-authentications, but only if an authentication attempt after a 401 status failed.)