GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / man / sasl_callbacks.3
1 .\" -*- nroff -*-
2 .\" 
3 .\" Copyright (c) 2006 Carnegie Mellon University.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer. 
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in
14 .\"    the documentation and/or other materials provided with the
15 .\"    distribution.
16 .\"
17 .\" 3. The name "Carnegie Mellon University" must not be used to
18 .\"    endorse or promote products derived from this software without
19 .\"    prior written permission. For permission or any other legal
20 .\"    details, please contact  
21 .\"      Office of Technology Transfer
22 .\"      Carnegie Mellon University
23 .\"      5000 Forbes Avenue
24 .\"      Pittsburgh, PA  15213-3890
25 .\"      (412) 268-4387, fax: (412) 268-7395
26 .\"      tech-transfer@andrew.cmu.edu
27 .\"
28 .\" 4. Redistributions of any form whatsoever must retain the following
29 .\"    acknowledgment:
30 .\"    "This product includes software developed by Computing Services
31 .\"     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
32 .\"
33 .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
34 .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35 .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
36 .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
38 .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
39 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40 .\" 
41 .TH sasl_callbacks "12 February 2006" SASL "SASL man pages"
42 .SH NAME
43 sasl_callbacks \- How to work with SASL callbacks
44
45 .SH SYNOPSIS
46 .nf
47 .B #include <sasl/sasl.h>
48
49 .fi
50 .SH DESCRIPTION
51
52 .B sasl_callbacks
53 are used when the application needs some information from the
54 application. Common reasons are getting for getting usernames and
55 passwords. A client MUST specify what callbacks they support in the
56 sasl_client/server_init() or sasl_client/server_new() calls. If an
57 authentication mechanism needs a callback that the application does
58 not state it supports it cannot be used. 
59
60 If a callback has an
61 .B id
62 parameter that should be checked to make sure you are giving the appropriate value.
63
64 If an application is using the client side of the library functions to handle the callbacks are not necessary. Instead the application may deal with callbacks via SASL_INTERACT's. See sasl_client_start/step() for more information.
65
66 The list of callbacks follows:
67
68 .SH Common Callbacks
69 .TP 0.8i
70 sasl_getopt_t
71 Get an option value
72 .TP 0.8i
73 sasl_log_t
74 Log message handler
75 .TP 0.8i
76 sasl_getpath_t
77 Get path to search for plugins (e.g. SASL mechanisms)
78 .TP 0.8i
79 sasl_verifyfile_t
80 Verify files for use by SASL
81 .TP 0.8i
82 sasl_canon_user_t
83 Username canonicalization function.
84
85 .SH Client-only Callbacks
86 .TP 0.8i
87 sasl_getsimple_t
88 Get user/language list
89 .TP 0.8i
90 sasl_getsecret_t
91 Get authentication secret
92 .TP 0.8i
93 sasl_chalprompt_t
94 Display challenge and prompt for response
95 .TP 0.8i
96 sasl_getrealm_t
97 Get the realm for authentication
98
99 .SH Server-only Callbacks
100 .TP 0.8i
101 sasl_authorize_t
102 Authorize policy callback
103 .TP 0.8i
104 sasl_server_userdb_checkpass_t
105 verify plaintext password
106 .TP 0.8i
107 sasl_server_userdb_setpass_t
108 set plaintext password
109 .TP 0.8i
110 sasl_getconfpath_t
111 Get path to search for SASL configuration file (server side only). New in SASL 2.1.22.
112
113 .SH "RETURN VALUE"
114
115 SASL callback functions should return SASL return codes. See sasl.h for a complete list. SASL_OK typically indicates success.
116
117 .SH "CONFORMING TO"
118 RFC 2222
119
120 .SH "SEE ALSO"
121 sasl(3), sasl_errors(3), sasl_authorize_t(3), sasl_log_t(3), sasl_getpath_t(3),
122 sasl_getconfpath_t(3), sasl_verifyfile_t(3), sasl_canon_user_t(3), sasl_getsimple(3),
123 sasl_getsecret_t(3), sasl_chalprompt_t(3), sasl_getrealm_t(3),
124 sasl_authorize_t(3), sasl_server_userdb_checkpass_t(3),
125 sasl_server_userdb_setpass_t(3)