# Module OBus_auth.Client

    module Client: sig .. end

Client-side authentication

###### Mechanisms

    type mechanism_return =

`|` | `Mech_continue of `OBus_auth.data`` | `(*` | Continue the authentication with this response | `*)`
`|` | `Mech_ok of `OBus_auth.data`` | `(*` | Authentification done | `*)`
`|` | `Mech_error of `string`` | `(*` | Authentification failed | `*)`

    class virtual mechanism_handler : object .. end

    type mechanism = {

`` | `mech_name : `string`;` | `(*` | Name of the mechanism | `*)`
`` | `mech_exec : `unit -> mechanism_handler`;` | `(*` | Mechanism creator | `*)`

}
An client-side authentication mechanism

    val mech_name : mechanism -> string

`mech_name` projection

    val mech_exec : mechanism -> unit -> mechanism_handler

`mech_exec` projection
Predefined mechanisms

    val mech_external : mechanism

    val mech_anonymous : mechanism

    val mech_dbus_cookie_sha1 : mechanism

    val default_mechanisms : mechanism list

###### Authentication

    val authenticate : ?capabilities:OBus_auth.capability list ->
           ?mechanisms:mechanism list ->
           stream:OBus_auth.stream ->
           unit -> (OBus_address.guid * OBus_auth.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`.

`capabilities` : defaults to []
`mechanisms` : defualts to `OBus_auth.Client.default_mechanisms`