1 .\" <!-- $Id: auth_sasl.sgml,v 1.4 2008/07/13 21:58:26 mrsam Exp $ -->
2 .\" <!-- Copyright 2004-2008 Double Precision, Inc. See COPYING for -->
3 .\" <!-- distribution information. -->
6 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
8 .\" Manual: Double Precision, Inc.
9 .\" Source: Double Precision, Inc.
11 .TH "AUTH_SASL" "3" "08/23/2008" "Double Precision, Inc." "Double Precision, Inc."
12 .\" disable hyphenation
14 .\" disable justification (adjust text to left margin only)
17 auth_sasl, auth_sasl_ex - SASL implementation
22 #include <courierauthsasl\.h>
26 .BI "int rc=auth_sasl(const\ char\ *" "method" ", const\ char\ *" "initialresponse" ", char\ *" "(*conversation_func)" "(const\ char\ *,\ void\ *)), void\ *" "callback_arg" ", char\ **" "authtype_ret" ", char\ **" "authdata_ret" ");"
28 .BI "int rc=auth_sasl_ex(const\ char\ *" "method" ", const\ char\ *" "initialresponse" ", const\ char\ *" "externalauth" ", char\ *" "(*conversation_func)" "(const\ char\ *,\ void\ *)), void\ *" "callback_arg" ", char\ **" "authtype_ret" ", char\ **" "authdata_ret" ");"
35 server implementation\.
41 knows how to handle the following SASL methods:
44 \h'-04'\(bu\h'+03'LOGIN
48 \h'-04'\(bu\h'+03'PLAIN
52 \h'-04'\(bu\h'+03'CRAM\-MD5
56 \h'-04'\(bu\h'+03'CRAM\-SHA1
61 is a base64\-encoded initial response provided in the client\'s
67 if an initial response was not included in the client\'s
72 \fIconversation_func\fR
73 is the application\-implemented
75 conversation callback function\.
76 \fIconversation_func\fR
77 receives a base64\-encoded
83 \fIconversation_func\fR
84 must return a buffer containing the base64\-encoded reply from the client\.
88 this buffer when it\'s done\.
89 \fIconversation_func\fR
103 method\. It takes an extra parameter,
104 \fIexternalauth\fR\. This parameter should be set to indicate an login that was authenticated via some other means, such as, perhaps, an
108 if no externally\-authenticated identity was established\.
118 is ignored\. Otherwise, if
128 AUTHSASL_OK, and sets
132 accordingly, so that the subsequent invocation of
133 \fBauth_generic\fR() returns authentication information for the login ID specified by
139 conversation succesfully completes,
146 \fI*authdata_ret\fR\. They will be set to a
147 \fBmalloc\fR(3)\-ed buffers that can be directly passed as arguments to
148 \fI\fBauth_generic\fR(3)\fR\&[1]\. It is the application\'s responsibility to
150 these buffers when it\'s done with them\.
160 conversation succesfully completes, and
164 are succesfully assembled\. Any other return indicates an error condition\. Right now two error conditions are defined:
170 conversation was aborted by the client\.
175 General error (insufficient memory, or some other reason)\. Check
182 \fI\fBauthlib\fR(3)\fR\&[2],
183 \fI\fBauth_generic\fR(3)\fR\&[1]\.
186 \fBauth_generic\fR(3)