EzAuth.Sender behaviour (EzAuth v0.1.0)

Copy Markdown View Source

Behaviour for delivering out-of-band authentication messages.

Summary

Callbacks

Delivers an auth message for the given event and scope.

Callbacks

deliver(event, scope)

@callback deliver(event :: atom(), scope :: struct()) :: :ok | {:error, term()}

Delivers an auth message for the given event and scope.

When sender delivery fails with {:error, reason}, it does not abort the auth flow. The result is propagated normally and may be handled by the configured handler via handle_failure/3.

Functions

maybe_invoke(sender, event, scope)