.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Memcached::libmemcached::memcached_sasl 3pm" .TH Memcached::libmemcached::memcached_sasl 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME memcached_set_sasl_callbacks, memcached_get_sasl_callbacks, memcached_sasl_set_auth_data, memcached_destroy_sasl_auth_data \- SASL support .SH LIBRARY .IX Header "LIBRARY" C Client Library for memcached (libmemcached, \-lmemcached) .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& void memcached_set_sasl_callbacks(memcached_st *ptr, \& const sasl_callback_t *callbacks) \& \& const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr) \& \& memcached_return memcached_set_sasl_auth_data(memcached_st *ptr, \& const char *username, \& const char *password) \& memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr) .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBlibmemcached\fR\|(3) allows you to plug in your own callbacks function used by libsasl to perform SASL authentication. .PP Please note that SASL requires the memcached binary protocol, and you have to specify the callbacks before you connect to the server. .PP \&\fBmemcached_set_sasl_auth_data()\fR is a helper function for you defining the basic functionality for you, but it will store the username and password in memory. If you choose to use this method you have to call memcached_destroy_sasl_auth_data before calling memcached_free to avoid a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you specify your own callback function with \fBmemcached_set_sasl_callbacks()\fR. .PP You as a client user have to initialize libsasl by using sasl_client_init before enabling it in libmemcached, and you have to shut down libsasl by calling \fBsasl_done()\fR when you are done using SASL from libmemcached. .SH RETURN .IX Header "RETURN" \&\fBmemcached_get_sasl_callbacks()\fR returns the callbacks currently used by this memcached handle. \&\fBmemcached_get_sasl_set_auth_data()\fR returns MEMCACHED_SUCCESS upon success. .SH HOME .IX Header "HOME" To find out more information please check: .SH AUTHOR .IX Header "AUTHOR" Trond Norbye, .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBmemcached\fR\|(1) \fBlibmemcached\fR\|(3)