Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.25 KB

dbus_auth.md

File metadata and controls

44 lines (32 loc) · 1.25 KB

Module dbus_auth

Defines callbacks for implemeting an SASL authentication mechanism.

Copyright (c) (C) 2014, Jean Parpaillon

Authors: Jean Parpaillon (jean.parpaillon@free.fr).

See also: [

   -callback init() ->
     {ok, Resp :: binary()} |
     {continue, Resp :: binary(), State :: term()} |
     {error, term()}.

Returns a binary to be sent to other side.

  • {ok, binary()}: state-machine waits for OK or REJECT
  • {continue, binary()}: state-machine waits for a challenge (DATA ...) or REJECT
  • {error, term()}: an error occurred while initializing the mechanism
     -callback challenge(Chall :: binary(), State :: term()) ->
     {ok, Resp :: binary()} |
     {continue, Resp :: binary(), State :: term()} |
     {error, Reason :: term()}.

Called when receiving a challenge from the server. Answers has the same meaning as init @see init/0.

See D-Bus Specification and RFC 4422. for complete specification of the mechanisms. ](dbus_peer_conection.md).

Description

Authentication state machine is implemented in