package obus

  1. Overview
  2. Docs
On This Page
  1. Communication
Legend:
Library
Module
Module type
Parameter
Class
Class type

Handle authentication mechanisms

type data = string

Data for an authentication mechanism

exception Auth_failure of string

Exception raised when authentication fail

type capability = [
  1. | `Unix_fd
    (*

    The transport supports unix fd passing

    *)
]

List of capabilities 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.

  • parameter recv

    must read a complete line, ending with "\r\n",

  • parameter send

    must send 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 length 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