X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fsource%2Flibmemcached%2Fmemcached_sasl.rst;h=e7fbb63f45c6476ec8c982ca292624b010b6c96f;hb=refs%2Fheads%2Ftest%2Fpoll_timeout;hp=3be3f2b6f6b9b3413d1c820598a883c256a40eca;hpb=43032f572a83233b5183ed6989921efe930aa719;p=awesomized%2Flibmemcached diff --git a/docs/source/libmemcached/memcached_sasl.rst b/docs/source/libmemcached/memcached_sasl.rst index 3be3f2b6..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,13 +41,12 @@ 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 @@ -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)`