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 forOK
orREJECT
{continue, binary()}
: state-machine waits for a challenge (DATA ...
) orREJECT
{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).
Authentication state machine is implemented in