I'm trying to build a simple Vala/Gtk Twitter app, and I've managed to send tweets; however, the user has to authenticate every time, which entails going to a URL, clicking to give my App permission to post, copying the PIN, and pasting said PIN into my App. For each tweet.
I'd like to store this authentication information in the GNOME Keyring; however, I barely know anything about OAuth and I know nothing about the Keyring.
How can I store OAuth data into the Gnome Keyring? I'll accept answers in any language, although bonus points will be awarded for Vala answers. :)
You can use libsecret library which communicates with "Secret Service" through Dbus protocol .
First you need to define a password schema , which will be used later for token store/extraction .
Vala example :
Now you should store your token :
To extract stored token :
The package name called
libsecret-1
.To compile , add following flag to your makefile .