package obus

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module OBus_auth.ClientSource

Client-side authentication

Mechanisms
Sourcetype mechanism_return =
  1. | Mech_continue of data
    (*

    Continue the authentication with this response

    *)
  2. | Mech_ok of data
    (*

    Authentification done

    *)
  3. | Mech_error of string
    (*

    Authentification failed

    *)
Sourceclass virtual mechanism_handler : object ... end
Sourcetype mechanism = {
  1. mech_name : string;
    (*

    Name of the mechanism

    *)
  2. mech_exec : unit -> mechanism_handler;
    (*

    Mechanism creator

    *)
}

An client-side authentication mechanism

Sourceval mech_name : mechanism -> string

mech_name projection

Sourceval mech_exec : mechanism -> unit -> mechanism_handler

mech_exec projection

Predefined mechanisms
Sourceval mech_external : mechanism
Sourceval mech_anonymous : mechanism
Sourceval default_mechanisms : mechanism list
Authentication
Sourceval authenticate : ?capabilities:capability list -> ?mechanisms:mechanism list -> stream:stream -> unit -> (OBus_address.guid * capability list) Lwt.t

Launch client-side authentication on the given stream. On success it returns the unique identifier of the server address and capabilities that were successfully negotiated with the server.

Note: authenticate does not sends the initial null byte. You have to handle it before calling authenticate.

  • parameter capabilities

    defaults to