Mercurial > pidgin
annotate libpurple/protocols/jabber/auth.h @ 31332:886f6df50451
Polish translation updated (Piotr Drg). Fixes #13459
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 10 Mar 2011 10:19:58 +0000 |
parents | cea7e713ef07 |
children |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file auth.h Authentication routines |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15822 | 4 * purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
28048
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26481
diff
changeset
|
6 * Purple is the legal property of its developers, whose names are too numerous |
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26481
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
26481
diff
changeset
|
8 * source distribution. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15822
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 */ |
26481
5767b7698c73
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents:
19681
diff
changeset
|
24 #ifndef PURPLE_JABBER_AUTH_H_ |
5767b7698c73
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents:
19681
diff
changeset
|
25 #define PURPLE_JABBER_AUTH_H_ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 |
28696
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
27 typedef struct _JabberSaslMech JabberSaslMech; |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
28 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "jabber.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #include "xmlnode.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
28725
4f45aae3ace1
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <paul@darkrain42.org>
parents:
28707
diff
changeset
|
32 typedef enum { |
4f45aae3ace1
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <paul@darkrain42.org>
parents:
28707
diff
changeset
|
33 JABBER_SASL_STATE_FAIL = -1, /* Abort, Retry, Fail? */ |
4f45aae3ace1
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <paul@darkrain42.org>
parents:
28707
diff
changeset
|
34 JABBER_SASL_STATE_OK = 0, /* Hooray! */ |
4f45aae3ace1
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <paul@darkrain42.org>
parents:
28707
diff
changeset
|
35 JABBER_SASL_STATE_CONTINUE = 1 /* More authentication required */ |
4f45aae3ace1
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <paul@darkrain42.org>
parents:
28707
diff
changeset
|
36 } JabberSaslState; |
4f45aae3ace1
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <paul@darkrain42.org>
parents:
28707
diff
changeset
|
37 |
28696
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
38 struct _JabberSaslMech { |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
39 gint8 priority; /* Higher priority will be tried before lower priority */ |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
40 const gchar *name; |
28754
b94fd073187c
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <paul@darkrain42.org>
parents:
28725
diff
changeset
|
41 JabberSaslState (*start)(JabberStream *js, xmlnode *mechanisms, xmlnode **reply, char **msg); |
b94fd073187c
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <paul@darkrain42.org>
parents:
28725
diff
changeset
|
42 JabberSaslState (*handle_challenge)(JabberStream *js, xmlnode *packet, xmlnode **reply, char **msg); |
b94fd073187c
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <paul@darkrain42.org>
parents:
28725
diff
changeset
|
43 JabberSaslState (*handle_success)(JabberStream *js, xmlnode *packet, char **msg); |
b94fd073187c
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <paul@darkrain42.org>
parents:
28725
diff
changeset
|
44 JabberSaslState (*handle_failure)(JabberStream *js, xmlnode *packet, xmlnode **reply, char **msg); |
28696
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
45 void (*dispose)(JabberStream *js); |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
46 }; |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
47 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 void jabber_auth_start(JabberStream *js, xmlnode *packet); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 void jabber_auth_start_old(JabberStream *js); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 void jabber_auth_handle_challenge(JabberStream *js, xmlnode *packet); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 void jabber_auth_handle_success(JabberStream *js, xmlnode *packet); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 void jabber_auth_handle_failure(JabberStream *js, xmlnode *packet); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
28696
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
54 JabberSaslMech *jabber_auth_get_plain_mech(void); |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
55 JabberSaslMech *jabber_auth_get_digest_md5_mech(void); |
28707
c1d41b7484ff
jabber: Complete (though untested) SCRAM implementation.
Paul Aurich <paul@darkrain42.org>
parents:
28696
diff
changeset
|
56 JabberSaslMech **jabber_auth_get_scram_mechs(gint *count); |
28696
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
57 #ifdef HAVE_CYRUS_SASL |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
58 JabberSaslMech *jabber_auth_get_cyrus_mech(void); |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
59 #endif |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
60 |
30892
cea7e713ef07
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715
eion@robbmob.com
parents:
29861
diff
changeset
|
61 void jabber_auth_add_mech(JabberSaslMech *); |
cea7e713ef07
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715
eion@robbmob.com
parents:
29861
diff
changeset
|
62 void jabber_auth_remove_mech(JabberSaslMech *); |
cea7e713ef07
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715
eion@robbmob.com
parents:
29861
diff
changeset
|
63 |
28696
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
64 void jabber_auth_init(void); |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
65 void jabber_auth_uninit(void); |
8ada06fb65ed
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <paul@darkrain42.org>
parents:
28048
diff
changeset
|
66 |
26481
5767b7698c73
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents:
19681
diff
changeset
|
67 #endif /* PURPLE_JABBER_AUTH_H_ */ |