Re: Added Gnome keyring Support



2008/4/15 Nick Marshall <nmarshall23 gmail com>:
> John,
>
>  As you requested, I have attached a patch. I am very new to python. I
>  am still getting used to it's object model. It does everything
>  different.
>
>  Currently I have trying to figure just how to add a custom widget to
>  the glade widget palette. It would be easier to add the key ring input
>  widget, to a dialog if it was in the glade palette. The documentation
>  on how to added widget to glade-2 is lacking thought..

Actually I would recommend against this. I dont really think its worth
the effort. Its just as easy create the keyring widget code in the
dataprovider and pack it into a vbox from the glade file as it is to
do the object creation function business. In addition, I might be
moving away from glade, to the gtk ui builder stuff this cycle (in an
effort to reduce dependencies) so it would be beneficial not being too
closely tied to glade.

I have been playing with your code some more, and am thinking that
username/password keyring stuff could better fit as a proxy (or
observer) around normal gtk.Entry/s. This way dataproviders could do
something like (excuse pseudo code)

u = glade.get_widget(usename_entry)
pw = glade.get_widget(password_entry)

magic_password_entry = KeyringEntry(u,pw,;'google.com')

The magic_password_entry would be a normal gtk.Entry, but it would
save/prepopulate its contents using the infomation in u (for the
service google.com).

The same thing could also be accomplished with an observer type
pattern that watches the username entry for changes, and fills in the
password entry appropriately. Something like

key_magic = conduit.Settings.get_keyring_observer_singleton()
key_magic.do_magic(u,pw,'google.com')

Anyway, plenty to think about. As I mentioned in my first email, I
want to do this right, that is to solve the "remember my username on
this service" and the password problem.

>
>  I am all for adding my keyring code to the existing settings model. I
>  am still trying to grok python. Or I would have tried to do that
>  myself. It looks like the keyring can simplify coding dataproviders, I
>  hear that the new firefox is using the keyring. If so we should
>  encourage using those entries in the keyring.
>
>  Latter tomorrow I will be starting on the RTM code..

That is excellent to hear.

>
>  Nick
>
>
>
>  On Sun, Apr 13, 2008 at 6:56 AM, John Stowers <john stowers gmail com> wrote:
>  > Hi Nick,
>  >
>  >  Wow. Thanks for this contribution, its implementation is certainly
>  >  very interesting. I will have a look over it in the next few days, and
>  >  have a think about the best way this could be integrated into Conduit.
>  >
>  >  Whats interesting is that you have raised two issues
>  >  1) We should store passwords in keyring
>  >  2) Its stupid making the user enter their username and password
>  >  multiple times for one service
>  >
>  >  The Keyring class you created is a good first step at solving this. If
>  >  you have time, would you mind attaching your work as a patch against
>  >  http://bugzilla.gnome.org/show_bug.cgi?id=510106 so that we can track
>  >  modifications to it.
>  >
>  >  The confusing thing to think about is how to fit this into the
>  >  existing settings model, i.e. in such a way that its easy for people
>  >  who write dataproviders to get this stuff to happen automatically.
>  >
>  >  John
>  >
>  >  2008/4/13 Nick Marshall <nmarshall23 gmail com>:
>  >
>  >
>  > > I love Conduit, but I don't like that I have to reenter my user name
>  >  >  and passwords, for each module.. Wouldn't it be better if somehow we
>  >  >  could save them to cache? Well enter gnome keyring.
>  >  >
>  >  >  http://live.gnome.org/GnomeKeyring
>  >  >
>  >  >  Passwords for a user are stored in an encrypted file, What matters to
>  >  >  us is that the modules can just query this daemon and get the
>  >  >  authentication details it needs.
>  >  >
>  >  >  I have attached a tar file of two examples and an modified version of
>  >  >  the google calendar module, with a new calendar-config.glade. Copy
>  >  >  both of those files and pyKeyring.py to
>  >  >  /usr/lib/conduit/modules/GoogleModule to try out my changes.
>  >  >
>  >  >  Nick
>  >  >
>  >
>  >
>  > > _______________________________________________
>  >  >  Conduit-list mailing list
>  >  >  Conduit-list gnome org
>  >  >  http://mail.gnome.org/mailman/listinfo/conduit-list
>  >  >
>  >  >
>  >
>
>
>
>  --
>  И
>
>   http://blog.nocturnaltechie.com
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]