Evernote OAuth in C++

Due to the lack of an official Evernote client for Linux and dissatisfied with solutions like Neverpad and NixNote (formerly Nevernote), I have started working on my own Linux client.

It was while developing this that I learned that Evernote SDK for C++ doesn’t really provide any integration with OAuth. I couldn’t even find a well formed solution for the same on the Internet, except some forum posts suggesting using any available OAuth 1.0 client. Searching for OAuth clients for C++, I found O2. Using this, I was able to create a simple OAuth integration for Evernote.

Here are the steps :-

  1. Taking cue from O2 integration with Dropbox, I extended O1 to create EvernoteAuthenticator
  1. EvernoteClient demonstrates how EvernoteAuthenticator is initialized and called. Moreover, it handles the signals generated by EvernoteAuthenticator to open a browser, which is required for the user to enter his credentials to log in. It also allows the developer to use the sandboxed environment (more about that later).

Comments