X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fsource%2Flibmemcached%2Fmemcached_sasl.rst;h=e7fbb63f45c6476ec8c982ca292624b010b6c96f;hb=52027f889cdd7435ae3cba934f190996ad739a3a;hp=e87451ae5ef4a8933be28419d00972a7aa2ab0c2;hpb=bd68f254afbf924020f10bd7dcadac8f2aa3affa;p=awesomized%2Flibmemcached diff --git a/docs/source/libmemcached/memcached_sasl.rst b/docs/source/libmemcached/memcached_sasl.rst index e87451ae..e7fbb63f 100644 --- a/docs/source/libmemcached/memcached_sasl.rst +++ b/docs/source/libmemcached/memcached_sasl.rst @@ -1,27 +1,38 @@ SASL support ============ -.. index:: object: memcached_st - SYNOPSIS -------- -#include +#include + Compile and link with -lmemcached .. function:: void memcached_set_sasl_callbacks(memcached_st *ptr, const sasl_callback_t *callbacks) + :param ptr: pointer to initialized `memcached_st` struct + :param callbacks: pointer to `sasl_callbacks_t` holding the callbacks to use + .. function:: const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr) + :param ptr: pointer to initialized `memcached_st` struct + :returns: pointer to `sasl_callbacks_t` holding the callbacks currently used + .. function:: memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr, const char *username, const char *password) + :param ptr: pointer to initialized `memcached_st` struct + :param username: + :param password: + :returns: `memcached_return_t` indicating success + .. function:: memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr) -Compile and link with -lmemcached + :param ptr: pointer to initialized `memcached_st` struct + :returns: `memcached_return_t` indicating success DESCRIPTION ----------- -libmemcached(3) allows you to plug in your own callbacks function used by +`libmemcached` allows you to plug in your own callbacks function used by libsasl to perform SASL authentication. Please note that SASL requires the memcached binary protocol, and you have @@ -30,10 +41,9 @@ to specify the callbacks before you connect to the server. :func:`memcached_set_sasl_auth_data` is a helper function defining the basic functionality for you, but it will store the username and password in memory. If you choose to use this method you have to call -:type:`memcached_destroy_sasl_auth_data` before calling -:type:`memcached_free` to avoid a memory leak. You should NOT call -:type:`memcached_destroy_sasl_auth_data` if you specify your own callback -function with :func:`memcached_set_sasl_callbacks`. +`memcached_destroy_sasl_auth_data` before calling `memcached_free` to avoid a +memory leak. You should NOT call `memcached_destroy_sasl_auth_data` if you +specify your own callback function with `memcached_set_sasl_callbacks`. RETURN VALUE ------------ @@ -47,4 +57,16 @@ SEE ALSO .. only:: man - :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)` + :manpage:`memcached(1)` + :manpage:`libmemcached(3)` + :manpage:`memcached_strerror(3)` + :manpage:`sasl_client_new(3)` + :manpage:`sasl_callbacks(3)` + +.. only:: html + + * :manpage:`memcached(1)` + * :doc:`../libmemcached` + * :doc:`memcached_strerror` + * :manpage:`sasl_client_new(3)` + * :manpage:`sasl_callbacks(3)`