1 .TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "June 17, 2011" "0.49" "libmemcached"
3 memcached_set_sasl_callbacks \- libmemcached Documentation
5 .nr rst2man-indent-level 0
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17 .\" .rstReportMargin pre:
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 .\" Man page generated from reStructeredText.
35 #include <libmemcached/memcached_pool.h>
38 .B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
42 .B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
46 .B memcached_return memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
50 .B memcached_return memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
53 Compile and link with \-lmemcached
56 libmemcached(3) allows you to plug in your own callbacks function used by
57 libsasl to perform SASL authentication.
59 Please note that SASL requires the memcached binary protocol, and you have
60 to specify the callbacks before you connect to the server.
62 memcached_set_sasl_auth_data() is a helper function defining
63 the basic functionality for you, but it will store the username and password
64 in memory. If you choose to use this method you have to call
65 memcached_destroy_sasl_auth_data before calling memcached_free to avoid
66 a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
67 specify your own callback function with memcached_set_sasl_callbacks().
69 You as a client user have to initialize libsasl by using sasl_client_init
70 before enabling it in libmemcached, and you have to shut down libsasl by
71 calling sasl_done() when you are done using SASL from libmemcached.
74 memcached_get_sasl_callbacks() returns the callbacks currently used
75 by this memcached handle.
76 memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
79 To find out more information please check:
80 \fI\%http://libmemcached.org/\fP
83 Brian Aker, <\fI\%brian@tangent.org\fP>
85 Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
88 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
92 2011, Brian Aker DataDifferential, http://datadifferential.com/
93 .\" Generated by docutils manpage writer.