OAuth for Qt - kQOAuth
-
wrote on 18 Nov 2010, 06:53 last edited by
Hi,
I wanted to let you know that I've written an OAuth library for Qt, kQOAuth. A few words about kQOAuth:
- Written in C++ for Qt developers.
- Provides easy, "automated", OAuth authentication but also more advanced detailed control of the authentication process.
- OAuth request handling (request signing, submitting and result parsing).
- No dependencies to external libraries, for example QCA.
- Works with signals and slots - asynchronously.
- Handles protected resource owner authentication by taking care of opening temporary token retrieval web page and parsing the reply with a built in HTTP server.
More info here:
http://www.johanpaul.com/blog/2010/10/introducing-kqoauth-easy-and-powerful-oauth-library-for-qt/
http://www.johanpaul.com/blog/kqoauth/The library is LGPL licensed and source code can be found at Gitorious: http://www.gitorious.org/kqoauth
kQOAuth currently supports OAuth 1.0 with HMAC-SHA1 signing and POST requests. So I still want to add OAuth 2.0 support and GET requests for resource retrieval.
-
wrote on 18 Nov 2010, 10:59 last edited by
Good work!
Just a curiosity, why "kQOAuth"? Is there any relation with the "QOAuth":https://github.com/ayoy/qoauth/wiki code?
As you said it has no external dependencies, I think it would be easier to use this library in Symbian, because the problem with QOAuth was the dependency of QCA, which seems to not work on that platform. I'll check that when possible.
-
wrote on 18 Nov 2010, 11:08 last edited by
[quote author="anselmolsm" date="1290077961"]Good work!
[/quote]Thanks! :)
[quote author="anselmolsm" date="1290077961"]
Just a curiosity, why "kQOAuth"? Is there any relation with the "QOAuth":https://github.com/ayoy/qoauth/wiki code?
[/quote]None whatsoever other than it inspired me to write my own. I just didn't find QOAuth suitable for me or to be Qt-like enough.
As QOAuth name was already taken, I had to rename my lib with something else. k could come from KDE too, but it comes from Kypeli ;)
[quote author="anselmolsm" date="1290077961"]
As you said it has no external dependencies, I think it would be easier to use this library in Symbian, because the problem with QOAuth was the dependency of QCA, which seems to not work on that platform. I'll check that when possible.[/quote]It should be possible, yes. Just one place I want to improve on is an byte array handling:
http://gitorious.org/kqoauth/kqoauth/blobs/master/src/kqoauthutils.cpp#line47I want to get rid of those mem operations as they can be problematic in cross platform.
-
wrote on 18 Nov 2010, 12:28 last edited by
[quote author="Kypeli" date="1290078484"]
As QOAuth name was already taken, I had to rename my lib with something else. k could come from KDE too, but it comes from Kypeli ;)
[/quote]haha, great!
[quote author="Kypeli" date="1290078484"]
[quote author="anselmolsm" date="1290077961"]
As you said it has no external dependencies, I think it would be easier to use this library in Symbian, because the problem with QOAuth was the dependency of QCA, which seems to not work on that platform. I'll check that when possible.[/quote]It should be possible, yes. Just one place I want to improve on is an byte array handling:
http://gitorious.org/kqoauth/kqoauth/blobs/master/src/kqoauthutils.cpp#line47I want to get rid of those mem operations as they can be problematic in cross platform.
[/quote]Nice! Good to hear you're thinking about this king of thing. :-)
-
wrote on 18 Nov 2010, 14:53 last edited by
Just a guess, this might work:
@
QByteArray ipad;
QByteArray opad;
ipad.fill( 0, blockSize+1);
opad.fill( 0, blockSize+1);
@instead of
@
bzero(ipad, sizeof(ipad));
@And "QByteArray::replace()":http://doc.qt.nokia.com/4.7/qbytearray.html#replace instead of bcopy?
-
wrote on 20 Nov 2010, 09:04 last edited by
Thanks Volker! I just saw your post and added the filling of arrays with 0 to my earlier fix I already made.
So now I've removed the char pointers and C mem operations and the whole lib should be pure Qt. So should work on Symbian too.
2/6