4
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
5
<title>CamelSasl</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.1">
7
7
<link rel="start" href="index.html" title="Camel Reference Manual">
8
8
<link rel="up" href="Crypto.html" title="Crypto Contexts">
9
9
<link rel="prev" href="camel-CamelGpgContext.html" title="CamelGpgContext">
10
10
<link rel="next" href="camel-CamelSaslAnonymous.html" title="CamelSaslAnonymous">
11
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="classes.html" title="Part I. Camel Classes">
14
14
<link rel="chapter" href="ClassTree.html" title="Class hierarchy">
31
31
<th width="100%" align="center">Camel Reference Manual</th>
32
32
<td><a accesskey="n" href="camel-CamelSaslAnonymous.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2700109" class="shortcut">Top</a>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2728925" class="shortcut">Top</a>
36
<a href="#id2701184" class="shortcut">Description</a></nobr></td></tr>
36
<a href="#id2730000" class="shortcut">Description</a></nobr></td></tr>
38
38
<div class="refentry" lang="en">
39
39
<a name="camel-CamelSasl"></a><div class="titlepage"></div>
40
40
<div class="refnamediv"><table width="100%"><tr>
43
<a name="id2700109"></a><span class="refentrytitle">CamelSasl</span>
43
<a name="id2728925"></a><span class="refentrytitle">CamelSasl</span>
55
<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a>;
57
href="/opt/gnome/share/gtk-doc/html/glib/glib-Byte-Arrays.html#GByteArray"
58
>GByteArray</a>* <a href="camel-CamelSasl.html#camel-sasl-challenge">camel_sasl_challenge</a> (<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
60
href="/opt/gnome/share/gtk-doc/html/glib/glib-Byte-Arrays.html#GByteArray"
61
>GByteArray</a> *token,
62
<a href="camel-camel-exception.html#CamelException">CamelException</a> *ex);
63
char* <a href="camel-CamelSasl.html#camel-sasl-challenge-base64">camel_sasl_challenge_base64</a> (<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
55
<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a>;
56
GByteArray* <a class="link" href="camel-CamelSasl.html#camel-sasl-challenge">camel_sasl_challenge</a> (<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
58
<a class="link" href="camel-camel-exception.html#CamelException">CamelException</a> *ex);
59
char* <a class="link" href="camel-CamelSasl.html#camel-sasl-challenge-base64">camel_sasl_challenge_base64</a> (<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
65
<a href="camel-camel-exception.html#CamelException">CamelException</a> *ex);
67
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
68
>gboolean</a> <a href="camel-CamelSasl.html#camel-sasl-authenticated">camel_sasl_authenticated</a> (<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl);
69
<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a>* <a href="camel-CamelSasl.html#camel-sasl-new">camel_sasl_new</a> (const char *service_name,
61
<a class="link" href="camel-camel-exception.html#CamelException">CamelException</a> *ex);
62
gboolean <a class="link" href="camel-CamelSasl.html#camel-sasl-authenticated">camel_sasl_authenticated</a> (<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl);
63
<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a>* <a class="link" href="camel-CamelSasl.html#camel-sasl-new">camel_sasl_new</a> (const char *service_name,
70
64
const char *mechanism,
71
<a href="camel-CamelService.html#CamelService">CamelService</a> *service);
73
href="/opt/gnome/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
74
>GList</a>* <a href="camel-CamelSasl.html#camel-sasl-authtype-list">camel_sasl_authtype_list</a> (<a
75
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
76
>gboolean</a> include_plain);
77
<a href="camel-CamelService.html#CamelServiceAuthType">CamelServiceAuthType</a>* <a href="camel-CamelSasl.html#camel-sasl-authtype">camel_sasl_authtype</a> (const char *mechanism);
65
<a class="link" href="camel-CamelService.html#CamelService">CamelService</a> *service);
66
GList* <a class="link" href="camel-CamelSasl.html#camel-sasl-authtype-list">camel_sasl_authtype_list</a> (gboolean include_plain);
67
<a class="link" href="camel-CamelService.html#CamelServiceAuthType">CamelServiceAuthType</a>* <a class="link" href="camel-CamelSasl.html#camel-sasl-authtype">camel_sasl_authtype</a> (const char *mechanism);
82
72
<div class="refsect1" lang="en">
83
<a name="id2701184"></a><h2>Description</h2>
73
<a name="id2730000"></a><h2>Description</h2>
88
78
<div class="refsect1" lang="en">
89
<a name="id2701198"></a><h2>Details</h2>
79
<a name="id2730014"></a><h2>Details</h2>
90
80
<div class="refsect2" lang="en">
91
<a name="id2701208"></a><h3>
81
<a name="id2730024"></a><h3>
92
82
<a name="CamelSasl"></a>CamelSasl</h3>
93
<a class="indexterm" name="id2701221"></a><pre class="programlisting">typedef struct {
83
<a class="indexterm" name="id2730037"></a><pre class="programlisting">typedef struct {
94
84
CamelObject parent_object;
96
86
char *service_name;
107
97
<div class="refsect2" lang="en">
108
<a name="id2701238"></a><h3>
98
<a name="id2730054"></a><h3>
109
99
<a name="camel-sasl-challenge"></a>camel_sasl_challenge ()</h3>
110
<a class="indexterm" name="id2701252"></a><pre class="programlisting"><a
111
href="/opt/gnome/share/gtk-doc/html/glib/glib-Byte-Arrays.html#GByteArray"
112
>GByteArray</a>* camel_sasl_challenge (<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
114
href="/opt/gnome/share/gtk-doc/html/glib/glib-Byte-Arrays.html#GByteArray"
115
>GByteArray</a> *token,
116
<a href="camel-camel-exception.html#CamelException">CamelException</a> *ex);</pre>
100
<a class="indexterm" name="id2730067"></a><pre class="programlisting">GByteArray* camel_sasl_challenge (<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
102
<a class="link" href="camel-camel-exception.html#CamelException">CamelException</a> *ex);</pre>
118
If <em class="parameter"><code>token</code></em> is <a
119
href="/opt/gnome/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
120
><code class="literal">NULL</code></a>, generate the initial SASL message to send to
121
the server. (This will be <a
122
href="/opt/gnome/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
123
><code class="literal">NULL</code></a> if the client doesn't initiate the
104
If <em class="parameter"><code>token</code></em> is <code class="literal">NULL</code>, generate the initial SASL message to send to
105
the server. (This will be <code class="literal">NULL</code> if the client doesn't initiate the
124
106
exchange.) Otherwise, <em class="parameter"><code>token</code></em> is a challenge from the server, and
125
107
the return value is the response.</p>
130
112
<col align="left" valign="top">
133
<td><span class="term"><em class="parameter"><code>sasl</code></em> :</span></td>
134
<td> a <a href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object
138
<td><span class="term"><em class="parameter"><code>token</code></em> :</span></td>
140
href="/opt/gnome/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
141
><code class="literal">NULL</code></a>
145
<td><span class="term"><em class="parameter"><code>ex</code></em> :</span></td>
146
<td> a <a href="camel-camel-exception.html#CamelException"><span class="type">CamelException</span></a>
150
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
151
<td>the SASL response or <a
152
href="/opt/gnome/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
153
><code class="literal">NULL</code></a>. If an error occurred, <em class="parameter"><code>ex</code></em> will
115
<td><p><span class="term"><em class="parameter"><code>sasl</code></em> :</span></p></td>
116
<td> a <a class="link" href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object
120
<td><p><span class="term"><em class="parameter"><code>token</code></em> :</span></p></td>
121
<td> a token, or <code class="literal">NULL</code>
125
<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
126
<td> a <a class="link" href="camel-camel-exception.html#CamelException"><span class="type">CamelException</span></a>
130
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
131
<td>the SASL response or <code class="literal">NULL</code>. If an error occurred, <em class="parameter"><code>ex</code></em> will
161
139
<div class="refsect2" lang="en">
162
<a name="id2701433"></a><h3>
140
<a name="id2730249"></a><h3>
163
141
<a name="camel-sasl-challenge-base64"></a>camel_sasl_challenge_base64 ()</h3>
164
<a class="indexterm" name="id2701447"></a><pre class="programlisting">char* camel_sasl_challenge_base64 (<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
142
<a class="indexterm" name="id2730262"></a><pre class="programlisting">char* camel_sasl_challenge_base64 (<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl,
165
143
const char *token,
166
<a href="camel-camel-exception.html#CamelException">CamelException</a> *ex);</pre>
144
<a class="link" href="camel-camel-exception.html#CamelException">CamelException</a> *ex);</pre>
168
As with <a href="camel-CamelSasl.html#camel-sasl-challenge"><span class="type">camel_sasl_challenge</span></a>, but the challenge <em class="parameter"><code>token</code></em> and the
146
As with <a class="link" href="camel-CamelSasl.html#camel-sasl-challenge"><span class="type">camel_sasl_challenge</span></a>, but the challenge <em class="parameter"><code>token</code></em> and the
169
147
response are both base64-encoded.</p>
174
152
<col align="left" valign="top">
177
<td><span class="term"><em class="parameter"><code>sasl</code></em> :</span></td>
178
<td> a <a href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object
155
<td><p><span class="term"><em class="parameter"><code>sasl</code></em> :</span></p></td>
156
<td> a <a class="link" href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object
182
<td><span class="term"><em class="parameter"><code>token</code></em> :</span></td>
160
<td><p><span class="term"><em class="parameter"><code>token</code></em> :</span></p></td>
183
161
<td> a base64-encoded token
187
<td><span class="term"><em class="parameter"><code>ex</code></em> :</span></td>
188
<td> a <a href="camel-camel-exception.html#CamelException"><span class="type">CamelException</span></a>
165
<td><p><span class="term"><em class="parameter"><code>ex</code></em> :</span></p></td>
166
<td> a <a class="link" href="camel-camel-exception.html#CamelException"><span class="type">CamelException</span></a>
192
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
170
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
193
171
<td>the base64 encoded challenge string
200
178
<div class="refsect2" lang="en">
201
<a name="id2701582"></a><h3>
179
<a name="id2730398"></a><h3>
202
180
<a name="camel-sasl-authenticated"></a>camel_sasl_authenticated ()</h3>
203
<a class="indexterm" name="id2701595"></a><pre class="programlisting"><a
204
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
205
>gboolean</a> camel_sasl_authenticated (<a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl);</pre>
181
<a class="indexterm" name="id2730411"></a><pre class="programlisting">gboolean camel_sasl_authenticated (<a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a> *sasl);</pre>
212
188
<col align="left" valign="top">
215
<td><span class="term"><em class="parameter"><code>sasl</code></em> :</span></td>
216
<td> a <a href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object
191
<td><p><span class="term"><em class="parameter"><code>sasl</code></em> :</span></p></td>
192
<td> a <a class="link" href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object
220
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
196
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
221
197
<td>whether or not <em class="parameter"><code>sasl</code></em> has successfully authenticated the
222
user. This will be <a
223
href="/opt/gnome/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
224
><code class="literal">TRUE</code></a> after it returns the last needed response.
198
user. This will be <code class="literal">TRUE</code> after it returns the last needed response.
225
199
The caller must still pass that information on to the server and
226
200
verify that it has accepted it.
233
207
<div class="refsect2" lang="en">
234
<a name="id2701682"></a><h3>
208
<a name="id2730498"></a><h3>
235
209
<a name="camel-sasl-new"></a>camel_sasl_new ()</h3>
236
<a class="indexterm" name="id2701695"></a><pre class="programlisting"><a href="camel-CamelSasl.html#CamelSasl">CamelSasl</a>* camel_sasl_new (const char *service_name,
210
<a class="indexterm" name="id2730511"></a><pre class="programlisting"><a class="link" href="camel-CamelSasl.html#CamelSasl">CamelSasl</a>* camel_sasl_new (const char *service_name,
237
211
const char *mechanism,
238
<a href="camel-CamelService.html#CamelService">CamelService</a> *service);</pre>
212
<a class="link" href="camel-CamelService.html#CamelService">CamelService</a> *service);</pre>
245
219
<col align="left" valign="top">
248
<td><span class="term"><em class="parameter"><code>service_name</code></em> :</span></td>
222
<td><p><span class="term"><em class="parameter"><code>service_name</code></em> :</span></p></td>
249
223
<td> the SASL service name
253
<td><span class="term"><em class="parameter"><code>mechanism</code></em> :</span></td>
227
<td><p><span class="term"><em class="parameter"><code>mechanism</code></em> :</span></p></td>
254
228
<td> the SASL mechanism
258
<td><span class="term"><em class="parameter"><code>service</code></em> :</span></td>
232
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
259
233
<td> the CamelService that will be using this SASL
263
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
264
<td>a new <a href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object for the given <em class="parameter"><code>service_name</code></em>,
265
<em class="parameter"><code>mechanism</code></em>, and <em class="parameter"><code>service</code></em>, or <a
266
href="/opt/gnome/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
267
><code class="literal">NULL</code></a> if the mechanism is not
237
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
238
<td>a new <a class="link" href="camel-CamelSasl.html#CamelSasl"><span class="type">CamelSasl</span></a> object for the given <em class="parameter"><code>service_name</code></em>,
239
<em class="parameter"><code>mechanism</code></em>, and <em class="parameter"><code>service</code></em>, or <code class="literal">NULL</code> if the mechanism is not
275
247
<div class="refsect2" lang="en">
276
<a name="id2701838"></a><h3>
248
<a name="id2730653"></a><h3>
277
249
<a name="camel-sasl-authtype-list"></a>camel_sasl_authtype_list ()</h3>
278
<a class="indexterm" name="id2701851"></a><pre class="programlisting"><a
279
href="/opt/gnome/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
280
>GList</a>* camel_sasl_authtype_list (<a
281
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
282
>gboolean</a> include_plain);</pre>
250
<a class="indexterm" name="id2730667"></a><pre class="programlisting">GList* camel_sasl_authtype_list (gboolean include_plain);</pre>
289
257
<col align="left" valign="top">
292
<td><span class="term"><em class="parameter"><code>include_plain</code></em> :</span></td>
260
<td><p><span class="term"><em class="parameter"><code>include_plain</code></em> :</span></p></td>
293
261
<td> whether or not to include the PLAIN mechanism
297
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
299
href="/opt/gnome/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
300
><span class="type">GList</span></a> of SASL-supported authtypes. The caller must
265
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
266
<td>a <span class="type">GList</span> of SASL-supported authtypes. The caller must
301
267
free the list, but not the contents.
308
274
<div class="refsect2" lang="en">
309
<a name="id2701921"></a><h3>
275
<a name="id2730737"></a><h3>
310
276
<a name="camel-sasl-authtype"></a>camel_sasl_authtype ()</h3>
311
<a class="indexterm" name="id2701934"></a><pre class="programlisting"><a href="camel-CamelService.html#CamelServiceAuthType">CamelServiceAuthType</a>* camel_sasl_authtype (const char *mechanism);</pre>
277
<a class="indexterm" name="id2730750"></a><pre class="programlisting"><a class="link" href="camel-CamelService.html#CamelServiceAuthType">CamelServiceAuthType</a>* camel_sasl_authtype (const char *mechanism);</pre>
318
284
<col align="left" valign="top">
321
<td><span class="term"><em class="parameter"><code>mechanism</code></em> :</span></td>
287
<td><p><span class="term"><em class="parameter"><code>mechanism</code></em> :</span></p></td>
322
288
<td> the SASL mechanism to get an authtype for
326
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
327
<td>a <a href="camel-CamelService.html#CamelServiceAuthType"><span class="type">CamelServiceAuthType</span></a> for the given mechanism, if
292
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
293
<td>a <a class="link" href="camel-CamelService.html#CamelServiceAuthType"><span class="type">CamelServiceAuthType</span></a> for the given mechanism, if