quic_dist_auth behaviour (quic v1.4.3)

View Source

Optional 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

Callbacks

authenticate/3

-callback authenticate(Conn :: pid(), Side :: client | server, Timeout :: timeout()) ->
                          {ok, Info :: term()} | {error, Reason :: term()}.