1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
.\" <!-- $Id: auth_sasl.sgml,v 1.1 2004/10/21 00:10:49 mrsam Exp $ -->
.\" <!-- Copyright 2004 Double Precision, Inc. See COPYING for -->
.\" <!-- distribution information. -->
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "AUTH_SASL" "3" "15 July 2005" "Double Precision, Inc." ""
.SH NAME
auth_sasl \- SASL implementation
.SH SYNOPSIS
.nf
#include <courierauthsasl.h>
.fi
.sp
\fB
.sp
int rc=auth_sasl (const char *\fImethod\fB, const char *\fIinitialresponse\fB, char *(*\fIconversation_func\fB)(const char *, void *), void *\fIcallback_arg\fB, char **\fIauthtype_ret\fB, char **\fIauthdata_ret\fB);
\fR
.SH "DESCRIPTION"
.PP
\fBauth_sasl\fR
is a generic SASL server implementation.
\fImethod\fR is the requested SASL
method.
At this time
\fBauth_sasl\fR
knows how to handle the following SASL methods:
.TP 0.2i
\(bu
LOGIN
.TP 0.2i
\(bu
PLAIN
.TP 0.2i
\(bu
CRAM-MD5
.TP 0.2i
\(bu
CRAM-SHA1
.PP
\fIinitialresponse\fR
is a base64-encoded initial response provided in the client's
SASL request.
\fIinitialresponse\fR
must be NULL if an initial response was not included in
the client's SASL request.
.PP
\fIconversation_func\fR
is the application-implemented SASL
conversation callback function.
\fIconversation_func\fR
receives a base64-encoded SASL prompt,
and the \fIcallback_arg\fR
argument to \fBauth_sasl\fR\&.
\fIconversation_func\fR
must return a buffer containing the base64-encoded reply from the client.
\fBauth_sasl\fR
will
\fBfree\fR(3)
this buffer when it's done.
\fIconversation_func\fR
should return NULL
to abort the SASL conversation.
.SH "RETURNS"
.PP
If the SASL conversation succesfully completes,
\fBauth_sasl\fR
initializes \fI*authtype_ret\fR and
\fI*authdata_ret\fR\&.
They will be set to a
\fBmalloc\fR(3)-ed
buffers that can be directly passed as arguments to
\fBauth_generic\fR(3)\&.
It is the application's responsibility to
\fBfree\fR(3)
these buffers when it's done with them.
.PP
\fBauth_sasl\fR
returns
AUTHSASL_OK when the
SASL conversation succesfully completes, and
\fI*authtype_ret\fR and
\fI*authdata_ret\fR are succesfully assembled.
Any other return indicates an error condition.
Right now two error conditions are defined:
.TP
\fBAUTHSASL_ABORTED\fR
The SASL conversation was aborted by the client.
.TP
\fBAUTHSASL_ERROR\fR
General error (insufficient memory, or some other reason).
Check errno for any clues.
.SH "SEE ALSO"
.PP
\fBauthlib\fR(3),
\fBauth_generic\fR(3)\&.
|