View Source KafkaEx.Auth.ScramFlow (kafka_ex v0.15.0)

SCRAM auth flow (built-in)

Implements the SCRAM client exchange: client-first → server-first → client-final → server-final, including nonce generation, salted password derivation, proofs, and server signature validation.

Features

  • SCRAM-SHA-256 and SCRAM-SHA-512
  • Stateless helpers for building/validating messages
  • Integrates with KafkaEx.Auth.SASL for wire I/O

Security

  • Requires TLS in production deployments
  • Passwords are never logged; be careful with custom logging

See also

Summary

Types

@type algo() :: :sha256 | :sha512
@type send_fun() :: (binary() -> {:ok, binary()} | {:error, term()})

Functions

Link to this function

authenticate(username, password, algo, send_fun)

View Source
@spec authenticate(binary(), binary(), algo(), send_fun()) :: :ok | {:error, term()}