Bug 31888

Summary: Implement SASL in haze
Product: Telepathy Reporter: Jonny Lamb <jonny.lamb>
Component: hazeAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/jonny/telepathy-haze.git;a=shortlog;h=refs/heads/simple-sasl
Whiteboard: review+
i915 platform: i915 features:
Bug Depends on: 31900    
Bug Blocks:    

Description Jonny Lamb 2010-11-24 03:15:12 UTC
I've implemented the current DRAFT2 atm, but there won't be any (big) changes to the spec before it's unreleased soon. I'll update it to the undrafted spec when the appropriate tp-glib release is made.

Feel free to start the reviewing though.
Comment 1 Will Thompson 2010-11-24 03:24:05 UTC
     TpCMParamSpec password_spec =
         { "password", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING,
-          TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_SECRET,
+          TP_CONN_MGR_PARAM_FLAG_SECRET,
           NULL, 0, NULL, NULL,
           (gpointer) "password", NULL };

you should also change this:


 480     /* Password parameter: */
 481     if (!(self->priv->prpl_info->options & OPT_PROTO_NO_PASSWORD))
 482     {
 483         if (self->priv->prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL)
 484             password_spec.flags &= ~TP_CONN_MGR_PARAM_FLAG_REQUIRED;
 485         g_array_append_val (paramspecs, password_spec);
 486     }
Comment 2 Jonny Lamb 2010-11-24 03:40:04 UTC
(In reply to comment #1)
> you should also change this:

Good point, done.
Comment 3 Jonny Lamb 2010-11-25 02:07:23 UTC
I changed this to depend on TpSimplePasswordManager and the diff got magically smaller.

TpSimplePasswordManager is in bug #31900 which this bug now depends on.
Comment 4 Will Thompson 2010-11-25 03:35:48 UTC
+  if (error != NULL)
+    {
+      DEBUG ("Simple password manager failed: %s", error->message);
+
+      tp_base_connection_change_status (base_conn,
+          TP_CONNECTION_STATUS_DISCONNECTED,
+          TP_CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED);

Could we use tp_base_connection_disconnect_with_dbus_error() to give more details of what happened? We could have a code for “Needed a password, but you didn't give me one” maybe.
Comment 5 Jonny Lamb 2010-11-25 03:50:30 UTC
(In reply to comment #4)
> Could we use tp_base_connection_disconnect_with_dbus_error() to give more
> details of what happened? We could have a code for “Needed a password, but you
> didn't give me one” maybe.

We could, and I have. I left the details a{sv} empty as getting it from the channel might be a little odd. I'll ask the question in the tp-glib bug.
Comment 6 Will Thompson 2010-11-25 08:34:50 UTC
Look fine then. Ship it when the tp-glib stuff exists.
Comment 7 Jonny Lamb 2010-12-02 01:21:58 UTC
Hiiyaaa Will, so tp-glib 0.13.8 was just released with TpSimplePasswordManager in it, innit. I added a couple more patches to my branch. Do you still accept?
Comment 8 Will Thompson 2010-12-02 02:54:29 UTC
captain shippit has entered the building.
Comment 9 Jonny Lamb 2010-12-02 05:16:15 UTC
ta

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.