Sovite.SASL.Plain (sovite v0.2.0)

Copy Markdown View Source

The PLAIN mechanism (RFC 4616): [authzid] NUL authcid NUL password in one message. Only safe over TLS.

An authorization identity is accepted only when it equals the authentication identity: one user cannot act as another.

Summary

Functions

Starts the client side. Returns the initial response. credentials has :username and :password.

Answers a challenge (only an empty one is expected).

Functions

client_start(map)

@spec client_start(%{username: String.t(), password: String.t()}) ::
  {:ok, binary(), term()}

Starts the client side. Returns the initial response. credentials has :username and :password.

client_step(message, challenge)

@spec client_step(term(), binary()) :: {:ok, binary(), term()}

Answers a challenge (only an empty one is expected).