Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Showcase
  4. OAuth for Qt - kQOAuth
QtWS25 Last Chance

OAuth for Qt - kQOAuth

Scheduled Pinned Locked Moved Showcase
6 Posts 3 Posters 7.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kypeli
    wrote on 18 Nov 2010, 06:53 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anselmolsm
      wrote on 18 Nov 2010, 10:59 last edited by
      #2

      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.

      Anselmo L. S. Melo (anselmolsm)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kypeli
        wrote on 18 Nov 2010, 11:08 last edited by
        #3

        [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#line47

        I want to get rid of those mem operations as they can be problematic in cross platform.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          anselmolsm
          wrote on 18 Nov 2010, 12:28 last edited by
          #4

          [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#line47

          I 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. :-)

          Anselmo L. S. Melo (anselmolsm)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on 18 Nov 2010, 14:53 last edited by
            #5

            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?

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Kypeli
              wrote on 20 Nov 2010, 09:04 last edited by
              #6

              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.

              1 Reply Last reply
              0

              5/6

              18 Nov 2010, 14:53

              • Login

              • Login or register to search.
              5 out of 6
              • First post
                5/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved