quic_dist_auth behaviour (quic v1.8.2)
View SourceOptional authentication callback invoked between the QUIC handshake and the Erlang distribution handshake.
Configure via the auth_callback option (sys.config or -quic_dist auth_callback Mod:Fun):
{quic, [{dist, [
{auth_callback, {my_app_auth, authenticate}},
{auth_handshake_timeout, 10000}
]}]}.The callback runs on both sides. It can refuse the connection by returning {error, Reason}; the connection is then closed and the dist controller is never started.
Summary
Functions
Invoke a configured callback, turning a crash or a bad return into {error, _} so a buggy implementation cannot take down the process running it. Callers must filter out undefined first.
Callbacks
Functions
-spec run(Callback :: quic_dist:auth_callback(), Conn :: pid(), Side :: client | server, Timeout :: timeout()) -> {ok, term()} | {error, term()}.
Invoke a configured callback, turning a crash or a bad return into {error, _} so a buggy implementation cannot take down the process running it. Callers must filter out undefined first.