Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
QOAuth is a Qt-based C++ implementation of an interface to services using OAuth authorization scheme.
OK, but what’s the OAuth itself?
According to the OAuth Core 1.0 specification:
The OAuth protocol enables websites or applications (Consumers) to access Protected Resources from a web service (Service Provider) via an API, without requiring Users to disclose their Service Provider credentials to the Consumers.
Simply, OAuth is a way of connecting an application to the Service Provider’s API without needing to provide User’s login or password. The authorization is based on an exchange of a Token (user-specific) together with a Consumer Key (application-specific), encrypted with a combination of so called Token Secret and Customer Secret. Getting access to Protected Resources consists in three basic steps:
- obtaining an unauthorized Request Token from the Service Provider,
- asking the User to authorize the Request Token,
- exchanging the Request Token for an Access Token.
Details are covered in Section 6 of the OAuth 1.0 Core Specification. As the authorization procedure is quite complex, the QOAuth library helps to simplify it by doing all the dirty work behind the scenes.
Cool! I want to try it!
Note: KDE users can skip this paragraph :-)
Fine, all you have to do is install a few things before you could compile QOAuth library (often you already have installed most of them, if not all). Anyway, you will need:
- Qt libraries 4.4 at least, that’s for sure :)
- OpenSSL version 0.9.6 or newer (comes bundled with Linuxes and MacOS X, Windows users go here)
- QCA (Qt Cryptographic Architecture), available from Delta XMPP Project
- OpenSSL plugin to QCA, available from QCA homepage.
Once you have everything set up, get the QOAuth library sources from GitHub, and follow the well known procedure:
$ qmake $ make $ sudo make install
You’re done! Excuse me, Windows users, but I didn’t figured out the installation procedure for Windows yet…
Add to your project file:
CONFIG += oauth
And to your source code:
You can start playing up with QOAuth lib! Be sure to check out the full QOAuth documentation. Enjoy!