#define AUTH_ID_FROM_CHANNEL (   channel)    (vortex_sasl_is_authenticated (vortex_channel_get_connection (channel)) ? vortex_sasl_get_propertie (vortex_channel_get_connection (channel), VORTEX_SASL_AUTH_ID) : NULL)

Convenience macro that allows to get the auth Id for the connection that is running the channel provided.

The macro also check if the connection holding the channel was authenticated (by calling to vortex_sasl_is_authenticated). The macro doesn't check the sasl method used or if it is appropiated to your context. You must use other means to check/enforce SASL method allowed.

See also: AUTH_ID_FROM_CONN.

Parameters
channelThe channel that is supposed to be running inside a connection autenticated.
Returns
The auth id or NULL if it fails.