axl_bool vortex_sasl_is_authenticated ( VortexConnection connection  ) 

Allows to check if the given connection have been successfully authenticated.

Keep in mind this function will return axl_false either because the connection is not successfully authenticated or because current Vortex Library doesn't have SASL support.

Another issue is that this function will return axl_true for SASL operations requiring any SASL profile that have successfully ended. This includes ANONYMOUS profile.

Obviously, ANONYMOUS profile *DOES NOT* not provide any security measure. Inside environments that allows ANONYMOUS and other profiles such as PLAIN, CRAM-MD5 and DIGEST-MD5 could yield to authorize users that only have provided an anonymous token.

A good practice is not to mix on the same session ANONYMOUS profile and authentication based profiles. Design you code keeping this issue in mind.

Once the connection is authenticated you can use the following function to get the method that was used (selected by either the user or the server side):

Additionally, you can use the vortex_sasl_get_propertie function to get auth properties used for the authentication. This function and the previous one, vortex_sasl_auth_method_used, must be used only once called to vortex_sasl_is_authenticated and getting an afirmative result. Otherwise, data returned by vortex_sasl_auth_method_used or vortex_sasl_get_propertie must not be trusted.

connection The connection to check for authentication status.
axl_true if the connection is authenticated, axl_false if not.