Merge in documentation updates.
[m6w6/libmemcached] / docs / man / memcached_sasl.3
1 .TH "MEMCACHED_SASL" "3" "April 08, 2011" "0.47" "libmemcached"
2 .SH NAME
3 memcached_sasl \- libmemcached Documentation
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
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
30 ..
31 .\" Man page generated from reStructeredText.
32 .
33 .sp
34 memcached_set_sasl_callbacks, memcached_get_sasl_callbacks, memcached_sasl_set_auth_data, memcached_destroy_sasl_auth_data
35 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-**
36 .sp
37 SASL tests
38 .sp
39 C Client Library for memcached (libmemcached, \-lmemcached)
40 .SH SYNOPSIS
41 .sp
42 .nf
43 .ft C
44 #include <libmemcached/memcached.h>
45
46 void memcached_set_sasl_callbacks(memcached_st *ptr,
47 const sasl_callback_t *callbacks)
48
49 const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
50
51 memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
52 const char *username,
53 const char *password)
54 memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
55 .ft P
56 .fi
57 .SH DESCRIPTION
58 .sp
59 libmemcached(3) allows you to plug in your own callbacks function used by
60 libsasl to perform SASL authentication.
61 .sp
62 Please note that SASL requires the memcached binary protocol, and you have
63 to specify the callbacks before you connect to the server.
64 .sp
65 memcached_set_sasl_auth_data() is a helper function for you defining
66 the basic functionality for you, but it will store the username and password
67 in memory. If you choose to use this method you have to call
68 memcached_destroy_sasl_auth_data before calling memcached_free to avoid
69 a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
70 specify your own callback function with memcached_set_sasl_callbacks().
71 .sp
72 You as a client user have to initialize libsasl by using sasl_client_init
73 before enabling it in libmemcached, and you have to shut down libsasl by
74 calling sasl_done() when you are done using SASL from libmemcached.
75 .sp
76 memcached_get_sasl_callbacks() returns the callbacks currently used
77 by this memcached handle.
78 memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
79 .sp
80 To find out more information please check:
81 \fI\%http://libmemcached.org/\fP
82 .sp
83 Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
84 .SH SEE ALSO
85 .sp
86 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
87 .SH AUTHOR
88 Brian Aker
89 .SH COPYRIGHT
90 2011, Brian Aker
91 .\" Generated by docutils manpage writer.
92 .\"
93 .