2 * purple - Jabber Protocol Plugin
4 * Purple is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
34 static PurpleXmlNode
*finish_webex_authentication(JabberStream
*js
)
38 auth
= purple_xmlnode_new("auth");
39 purple_xmlnode_set_namespace(auth
, NS_XMPP_SASL
);
41 purple_xmlnode_set_attrib(auth
, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
42 purple_xmlnode_set_attrib(auth
, "ga:client-uses-full-bind-result", "true");
44 purple_xmlnode_set_attrib(auth
, "mechanism", "WEBEX-TOKEN");
45 purple_xmlnode_insert_data(auth
, purple_connection_get_password(js
->gc
), -1);
50 static JabberSaslState
51 jabber_webex_start(JabberStream
*js
, PurpleXmlNode
*packet
, PurpleXmlNode
**response
, char **error
)
53 *response
= finish_webex_authentication(js
);
54 return JABBER_SASL_STATE_OK
;
57 static JabberSaslMech webex_token_mech
= {
59 "WEBEX-TOKEN", /* name */
61 NULL
, /* handle_challenge */
62 NULL
, /* handle_success */
63 NULL
, /* handle_failure */
67 JabberSaslMech
*jabber_auth_get_webex_token_mech(void)
69 return &webex_token_mech
;