Thread: [Java-gnome-developer] Access to gnome keyring from java
Brought to you by:
afcowie
From: Johannes H. <han...@gm...> - 2008-07-01 15:17:19
|
Hey Everyone, at first thank you for reading this post. I have to write an Application which writes something to an LDAP Server. And if you wanna know, that works fine. But to connect to the LDAP Server we must specify a password. What I want to have is, that the gnome keyring manager saves the password for me and I only wanna connect to the keyring manager and get the pw outa it. Or the manager should autorize me to get the password. But how can I connect to the Keyring Mananger in my Java Application? I've downloaded the Libraries and added them into Netbeans, but I did not find an Class called like "KeyRingManger" or "KeyRingConnection". I think here are the methods I'd like to use http://library.gnome.org/devel/gnome-keyring/stable/ch01.html but how can I access them trough the java bindings? I've added these Libs gtk-4.0.jar gtk.jar glib0.4-0.4.2.jar glib0.4.jar gnome2.12-2.12.7.jar gnome2.12.jar Do you know how this works, and if you know could you send me a link to and tutorial or example or anything like that. Furthermore sorry for my bad english. Thx for helping me |
From: Andrew C. <an...@op...> - 2008-07-02 07:27:19
|
On Tue, 2008-07-01 at 17:17 +0200, Johannes Homuth wrote: > Hey Everyone, Hello. > > I have to write an Application which writes something to an LDAP > Server. And if you wanna know, that works fine. But to connect to the > LDAP Server we must specify a password. What I want to have is, that > the gnome keyring manager saves the password for me and I only wanna > connect to the keyring manager and get the pw outa it. Or the manager > should autorize me to get the password. Either approach seems reasonable. I've not studied the Seahorse code, so I couldn't say for sure. > But how can I connect to the Keyring Mananger in my Java Application? You will be able to use java-gnome to talk to GNOME's keyring manager if and when someone writes a binding for those APIs. Nobody has done that yet. It would certainly be a nice feature to have in java-gnome. If you want to pursue doing it yourself and would like to do so in a way that can be contributed to java-gnome, then by all means we can discuss it. The "java-gnome-hackers" mailing list or #java-gnome would be a good place to have such a conversation. Otherwise I'm afraid you will have to wait until someone has a reason to want to write coverage of that particular piece of the GNOME platform. ++ Oh, > gtk-4.0.jar Is all you need. Or gtk.jar - it's a symlink to the current gtk-$APIVERSION.jar AfC Sydney |
From: Srichand P. <sri...@gm...> - 2008-07-03 01:44:29
|
Just a thought: The gnome-keyring API is still in flux, as is mentioned at http://live.gnome.org/GnomeKeyring/StoringPasswords . Although the API is nice and small (3 meaty methods!) and could probably be re-written to match the upstream API as and when it changes, would it make sense to hold off binding it until its a little more mature? [Also, the page in question was last edited on 2008-02-03, so perhaps I'm totally off the mark with the whole thing too] Srichand -- Srichand Pendyala Office: 906-487-4308 Graduate Teaching Assistant Mobile: 906-370-5857 Department of Computer Science Michigan Technological University Houghton MI 49931 Office: 324 Rekhi Hall Hours for CS1121: M 11-1, T 12-1 http://srichand.net.in/ |
From: Andrew C. <an...@op...> - 2008-07-03 02:41:52
|
On Wed, 2008-07-02 at 20:44 -0500, Srichand Pendyala wrote a reply to a message on the java-gnome-developer mailing list; I have sent my reply and invited follow ups to java-gnome-hackers: > Just a thought: > > The gnome-keyring API is still in flux, as is mentioned at > http://live.gnome.org/GnomeKeyring/StoringPasswords . Although the API > is nice and small (3 meaty methods!) From a first glance at the API pages, it seems that the real problem would be working out how to handle all the async callbacks. We don't have a terribly good mechanism for that at the moment [and have only done it manually once - the hack that made TreeModelFilter's setVisibleCallback() work by turning it into a signal] so perhaps it's time that we worked that out in the architecture and then extruded that design via the code generator. > and could probably be re-written to > match the upstream API as and when it changes, Sure. > would it make sense to > hold off binding it until its a little more mature? It's probably hardening. The degree of arterial sclerosis that occurs once a library has been released out into the wilds is fairly insane. While I have no objection at all to binding against unstable libraries, the changing signature problem could cause us to have link failures if the underlying library in question is iterating too fast. {shrug} That's life in the big city; and as I'm not into having java-gnome support ancient versions of underlying libraries but rather have stipulated the dependency as latest releases (ie, GTK 2.12, Cairo 1.6.4, and for that matter, GNOME 2.22, etc) we shouldn't have too much problem when the time comes. AfC Sydney |