vortex.sasl — LuaVortex SASL module: SASL authentication functions

This modules includes all functions required to authenticate a BEEP connection.

Module API


Allows to init SASL module on the provided vortex.ctx reference. This is required before any SASL operation is done.

Parameters:ctx (vortex.ctx) – vortex context where SASL module will be initialized
Return type:true it initialization was completed, otherwise false is returned.

Allows to check if the provided connection is authenticated using SASL methods.

Parameters:conn (vortex.connection) – the connection to check for its authentication status.
vortex.sasl.start_auth(conn, profile, auth_id/anonymous_token[, password][, authorization_id][, realm][, auth_notify][, auth_notify_data])

Allows to start a SASL authentication process using the provided SASL mech (profile) on the provided connection.

The rest of optional arguments are used to either set parameters required by the SASL mechanism or to receive async authentication termination status (auth_notify). See vortex library manual to know which attributes you must provide for each mechanism:


  • conn (vortex.Connection) – The connection where the SASL process will take place.
  • profile (string) – SASL mechanism to use.
  • auth_id/anonymous_token (string) – This is the user identification id or the anonymous token in the case of anonymous profile.
  • authorization_id (string) – This is the user authorization id.
  • password (string) – This is the user password
  • realm (string) – This is the authentication domain.
  • auth_notify (SASL auth notification) – User defined handler that will be used to notify SASL termination status.
  • auth_notify_data (object) – User defined data that will notified along with corresponding data at auth notify handler.

Allows to get the SASL mechanism that was used to authenticate the connection.


Allows to get the SASL auth_id value used during the authentication process (only in the case a SASL mechanism requiring it was used).

vortex.sasl.accept_mech(ctx, profile, auth_handler[, auth_handler_data])

Server side SASL authentication support. This function allows to configure a handler that will be called to complete the authentication process for the provided SASL mechanism.

  • ctx (vortex.Ctx) – The context where the SASL handling will be configured.
  • profile (string) – The SASL mechanism that will be accepted and managed by the handler provided.
  • auth_handler (SASL common auth handler) – This is the SASL auth handler used to complete the operation.
  • auth_handler_data (object) – User defined data to be passed to auth_handler along with corresponding handler parameters.

(Read only attribute) (String) Full SASL Plain URI.


(Read only attribute) (String) Full SASL Anonymous URI.


(Read only attribute) (String) Full SASL External URI.


(Read only attribute) (String) Full SASL Cram-Md5 URI.


(Read only attribute) (String) Full SASL Digest-Md5 URI.