X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fsource%2Flibmemcached%2Fmemcached_sasl.rst;h=e7fbb63f45c6476ec8c982ca292624b010b6c96f;hb=b7f446e55146456e368c3926347f4c771afcea8c;hp=26b003877e4ab162800b1944c63238e2aa8f3a25;hpb=bdf3398dac90a54d82aed65099290d51e92d4601;p=awesomized%2Flibmemcached diff --git a/docs/source/libmemcached/memcached_sasl.rst b/docs/source/libmemcached/memcached_sasl.rst index 26b00387..e7fbb63f 100644 --- a/docs/source/libmemcached/memcached_sasl.rst +++ b/docs/source/libmemcached/memcached_sasl.rst @@ -1,30 +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 @@ -33,23 +41,32 @@ 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 ------- +RETURN VALUE +------------ :func:`memcached_get_sasl_callbacks` returns the callbacks currently used by this memcached handle. :func:`memcached_set_sasl_auth_data` returns `MEMCACHED_SUCCESS` upon success. --------- 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)`