QEverCloud
Unofficial Evernote Cloud API for Qt
Classes | Functions
OAuth functionality

Classes

class  qevercloud::EvernoteOAuthDialog
 Authorizes your app with the Evernote service by means of OAuth authentication. More...
 
class  qevercloud::EvernoteOAuthWebView
 The class is tailored specifically for OAuth authorization with Evernote. More...
 

Functions

void qevercloud::setNonceGenerator (quint64(*nonceGenerator)())
 Sets the function to use for nonce generation for OAuth authentication. More...
 

Detailed Description

Reasons for QEverCloudOAuth.h header file

Using EvernoteOAuthDialog or EvernoteOAuthWebView implies the use of QtWidgets and QtWebkit modules so you have to use them in your app:
# Somewhere in your Qt 5 .pro file
QT += widgets webkitwidgets
Other parts of QEverCloud depend only on QtCore and QtNetwork modules so all OAuth functionality is moved into a separate inculde file named QEverCloudOAuth.h. If you do not use the provided OAuth functionality (say, you write a small app for personal use which relies on developer tokens only) and do not include the header then your app will not depend on the QtWidgets and QtWebkit modules.

Function Documentation

void qevercloud::setNonceGenerator ( quint64(*)()  nonceGenerator)

Sets the function to use for nonce generation for OAuth authentication.

Note
The default algorithm uses qrand() so do not forget to call qsrand() in your application!

qrand() is not guaranteed to be cryptographically strong. I try to amend the fact by using QUuid::createUuid() which uses /dev/urandom if it's availabe. But this is no guarantee either. So if you want total control over nonce generation you can write you own algorithm.

setNonceGenerator is NOT thread safe.