View Full Version : QOAuth - a Qt OAuth library

24th June 2009, 19:18
QOAuth is an attempt to support interaction with OAuth-powered network services in a Qt way, i.e. simply, clearly and efficiently. It gives the application developer no more than 4 methods, namely:

requestToken() – to obtain an unauthorized Request Token,
accessToken() – to exchange Request Token for the Access Token,
createParametersString() – to construct a request according to OAuth authorization scheme,
inlineParemeters() - to construct a query string basing on given parameters (provided only for convenience).

First two methods serve application authorization purposes, whilst the third one is used for accessing Protected Resources. The complete documentation is available locally as well as online:


QOAuth internally makes use of QCA (Qt Cryptographic Architecture). Here is the complete list of its dependencies:

Qt libraries 4.4 at least,
QCA (Qt Cryptographic Architecture), available from Delta XMPP Project
OpenSSL plugin to QCA, available from QCA homepage (this pulls in
a dependency on OpenSSL of course).

Note: KDE users meet all the requirements out of the box.


$ qmake
$ make
$ sudo make install

Add these two lines to your project:

in project file:

CONFIG += oauth

in source code:

#include <QtOAuth>

You can start using QOAuth.

report them to QOAuth's bug tracking system:

10th August 2009, 13:50
QOAuth 1.0 was released on 7th of August. Here's the changelog:

v1.0 (07/08/2009):

Added support for RSA-SHA1 signing algorithm, also working with passphrase-protected private RSA keys. Passphrase is passed as a QCA::SecureArray, so it won’t be cached on disk or left in memory after quitting the application.
Added initial support for PLAINTEXT authorization. It seems to be working, however it may fail with untrusted SSL connections. I didn’t find a service that takes PLAINTEXT into use, only tested it with a test server which communicates over HTTP (unencrypted). But still, if anybody uses PLAINTEXT authorization and provides untrusted server to handle it, it kinda sucks…
inlineParameters() extended by the parameter specifying parsing method – now it’s usable for both GET and POST requests,
Introduced the QOAuth namespace, with QOAuth::Interface class holding the core functionality.

The code is available from GitHub (http://github.com/ayoy/qoauth), the binaries from qt-apps.org (http://www.qt-apps.org/content/show.php?content=107420), the full documentation from this place (http://files.ayoy.net/qoauth/1.0/doc/), and the bugs from Lighthouseapp.com (http://ayoy.lighthouseapp.com/projects/32547-qoauth/tickets?q=all).