1MEMCACHED_GET_SASL_CALLBACKS(3l)ibmemcached-awesomMeEMCACHED_GET_SASL_CALLBACKS(3)
2
3
4
6 memcached_get_sasl_callbacks - libmemcached Documentation
7
9 #include <libmemcached/memcached.h>
10 Compile and link with -lmemcached
11
12 void memcached_set_sasl_callbacks(memcached_st *ptr, const sasl_call‐
13 back_t *callbacks)
14
15 Parameters
16
17 • ptr -- pointer to initialized memcached_st struct
18
19 • callbacks -- pointer to sasl_callbacks_t holding the
20 callbacks to use
21
22 const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
23
24 Parameters
25 ptr -- pointer to initialized memcached_st struct
26
27 Returns
28 pointer to sasl_callbacks_t holding the callbacks cur‐
29 rently used
30
31 memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr,
32 const char *username, const char *password)
33
34 Parameters
35
36 • ptr -- pointer to initialized memcached_st struct
37
38 • username --
39
40 • password --
41
42 Returns
43 memcached_return_t indicating success
44
45 memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr)
46
47 Parameters
48 ptr -- pointer to initialized memcached_st struct
49
50 Returns
51 memcached_return_t indicating success
52
54 libmemcached allows you to plug in your own callbacks function used by
55 libsasl to perform SASL authentication.
56
57 Please note that SASL requires the memcached binary protocol, and you
58 have to specify the callbacks before you connect to the server.
59
60 memcached_set_sasl_auth_data() is a helper function defining the basic
61 functionality for you, but it will store the username and password in
62 memory. If you choose to use this method you have to call
63 memcached_destroy_sasl_auth_data() before calling memcached_free() to
64 avoid a memory leak. You should NOT call
65 memcached_destroy_sasl_auth_data() if you specify your own callback
66 function with memcached_set_sasl_callbacks().
67
69 memcached_get_sasl_callbacks() returns the callbacks currently used by
70 this memcached handle. memcached_set_sasl_auth_data() returns
71 MEMCACHED_SUCCESS upon success.
72
74 memcached(1) libmemcached(3) memcached_strerror(3) sasl_client_new(3)
75 sasl_callbacks(3)
76
77
78
79
801.1 Nov 09, 2022 MEMCACHED_GET_SASL_CALLBACKS(3)