Merge in docs.
[m6w6/libmemcached] / docs / memcached_sasl.rst
1 .. highlight:: perl
2
3
4 memcached_set_sasl_callbacks, memcached_get_sasl_callbacks, memcached_sasl_set_auth_data, memcached_destroy_sasl_auth_data
5 **************************************************************************************************************************
6
7
8 SASL support
9
10
11 *******
12 LIBRARY
13 *******
14
15
16 C Client Library for memcached (libmemcached, -lmemcached)
17
18
19 ********
20 SYNOPSIS
21 ********
22
23
24
25 .. code-block:: perl
26
27 #include <libmemcached/memcached.h>
28
29 void memcached_set_sasl_callbacks(memcached_st *ptr,
30 const sasl_callback_t *callbacks)
31
32 const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
33
34 memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
35 const char *username,
36 const char *password)
37 memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
38
39
40
41 ***********
42 DESCRIPTION
43 ***********
44
45
46 libmemcached(3) allows you to plug in your own callbacks function used by
47 libsasl to perform SASL authentication.
48
49 Please note that SASL requires the memcached binary protocol, and you have
50 to specify the callbacks before you connect to the server.
51
52 memcached_set_sasl_auth_data() is a helper function for you defining
53 the basic functionality for you, but it will store the username and password
54 in memory. If you choose to use this method you have to call
55 memcached_destroy_sasl_auth_data before calling memcached_free to avoid
56 a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
57 specify your own callback function with memcached_set_sasl_callbacks().
58
59 You as a client user have to initialize libsasl by using sasl_client_init
60 before enabling it in libmemcached, and you have to shut down libsasl by
61 calling sasl_done() when you are done using SASL from libmemcached.
62
63
64 ******
65 RETURN
66 ******
67
68
69 memcached_get_sasl_callbacks() returns the callbacks currently used
70 by this memcached handle.
71 memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
72
73
74 ****
75 HOME
76 ****
77
78
79 To find out more information please check:
80 `http://libmemcached.org/ <http://libmemcached.org/>`_
81
82
83 ******
84 AUTHOR
85 ******
86
87
88 Trond Norbye, <trond.norbye@gmail.com>
89
90
91 ********
92 SEE ALSO
93 ********
94
95
96 memcached(1) libmemcached(3)
97