~piotr-sikora/libmemcached/fix-tests-on-openbsd

« back to all changes in this revision

Viewing changes to docs/memcached_sasl.rst

Merge in all of build.

Show diffs side-by-side

added added

removed removed

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