# Module OBus_auth

    module OBus_auth: sig .. end

Handle authentication mechanisms

    type data = string

Data for an authentication mechanism

    exception Auth_failure of string

Exception raise when authentication fail

    type capability = [ `Unix_fd ]

List of capatilities clients/servers may support

    val capabilities : capability list

List of all capabilities

###### Communication

    type stream

A stream is a way of communication for an authentication procedure

    val make_stream : recv:(unit -> string Lwt.t) ->
           send:(string -> unit Lwt.t) -> stream

Creates a stream for authentication.
`recv` : must reads a complete line, ending with `"\r\n"`,
`send` : must sends the given line.

    val stream_of_channels : Lwt_io.input_channel * Lwt_io.output_channel -> stream

Creates a stream from a pair of channels

    val stream_of_fd : Lwt_unix.file_descr -> stream

Creates a stream from a file descriptor. Note that the stream created by this function is not really efficient because it has to read characters one by one to ensure it does not consume too much.

    val max_line_length : int

Maximum lenght accepted for lines of the authentication protocol. Beyond this limit, authentication will fail.

    module Client: sig .. end

Client-side authentication

    module Server: sig .. end

Server-side authentication