Plasma GitLab Archive
Projects Blog Knowledge

Class type Nethttp_client.auth_session

class type auth_session = object .. end

An auth_session represents an authenticated session


method auth_scheme : string

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 : string

The realm

method auth_user : string

The user identifier (UTF-8)

method authenticate : http_call ->
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 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 option

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.)

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml