class type auth_session =object..end
An auth_session represents an authenticated session
method auth_scheme : stringThe authentication scheme, e.g. "basic"
method auth_domain : Neturl.url list * intThe 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 : stringThe realm
method auth_user : stringThe user identifier (UTF-8)
method authenticate : http_call ->
bool -> (string * string) list auth_statusReturns a list of additional headers that will authenticate
the passed call for this session. (This is usually only one
header, authorization.)
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 www-authenticate field(s).
The bool says whether this is the re-authentication path.
method auth_session_id : string optionAn 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 -> unitThe 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.)