Fix for rpm buidling/make --with-debug
[m6w6/libmemcached] / docs / memcached_sasl.pod
1 =head1 NAME
2
3 memcached_set_sasl_callbacks, memcached_get_sasl_callbacks,
4 memcached_sasl_set_auth_data, memcached_destroy_sasl_auth_data - SASL support
5
6 =head1 LIBRARY
7
8 C Client Library for memcached (libmemcached, -lmemcached)
9
10 =head1 SYNOPSIS
11
12 #include <memcached.h>
13
14 void memcached_set_sasl_callbacks(memcached_st *ptr,
15 const sasl_callback_t *callbacks)
16
17 const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
18
19 memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
20 const char *username,
21 const char *password)
22 memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
23
24
25 =head1 DESCRIPTION
26
27 libmemcached(3) allows you to plug in your own callbacks function used by
28 libsasl to perform SASL authentication.
29
30 Please note that SASL requires the memcached binary protocol, and you have
31 to specify the callbacks before you connect to the server.
32
33 memcached_set_sasl_auth_data() is a helper function for you defining
34 the basic functionality for you, but it will store the username and password
35 in memory. If you choose to use this method you have to call
36 memcached_destroy_sasl_auth_data before calling memcached_free to avoid
37 a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
38 specify your own callback function with memcached_set_sasl_callbacks().
39
40 You as a client user have to initialize libsasl by using sasl_client_init
41 before enabling it in libmemcached, and you have to shut down libsasl by
42 calling sasl_done() when you are done using SASL from libmemcached.
43
44
45 =head1 RETURN
46
47 memcached_get_sasl_callbacks() returns the callbacks currently used
48 by this memcached handle.
49 memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
50
51 =head1 HOME
52
53 To find out more information please check:
54 L<http://libmemcached.org/>
55
56 =head1 AUTHOR
57
58 Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
59
60 =head1 SEE ALSO
61
62 memcached(1) libmemcached(3)
63
64 =cut