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