* `MSN Live Connect OAuth2`_
* `Skyrock OAuth`_
* `Yahoo OAuth`_
+ * `Evernote OAuth`_
- Basic user data population and signaling, to allows custom fields values
from providers response
YAHOO_CONSUMER_KEY = ''
YAHOO_CONSUMER_SECRET = ''
+Evernote OAuth
+^^^^^^^^^^^^^^
+
+Evernote OAuth 1.0 workflow.
+
+- Register a new application at `Evernote API Key form`_.
+
+- Fill ``Consumer Key`` and ``Consumer Secret`` values in the settings::
+
+ EVERNOTE_CONSUMER_KEY = ''
+ EVERNOTE_CONSUMER_SECRET = ''
+
+
Testing
-------
- Skyrock.com support
+- hassek_ (Tomas Henriquez)
+
+ - Evernote support
+
+
Copyrights
----------
.. _Skyrock API Documentation: http://www.skyrock.com/developer/documentation/
.. _Yahoo OAuth: http://developer.yahoo.com/oauth/guide/oauth-auth-flow.html
.. _Yahoo Developer Center: https://developer.apps.yahoo.com/projects/
+.. _Evernote API Key form: http://dev.evernote.com/support/api_key.php
+.. _hassek: https://github.com/hassek
* MSN Live Connect support
* Yahoo OAuth 1.0 support
+niQo_ (Nicolas Quiénot)
+ * Skyrock.com support
+
+hassek_ (Tomas Henriquez)
+ * Evernote support
+
.. _caioariede: https://github.com/caioariede
.. _krvss: https://github.com/krvss
.. _jezdez: https://github.com/jezdez
.. _maraujop: https://github.com/maraujop
.. _bedspax: https://github.com/bedspax
.. _python-oauth2: https://github.com/simplegeo/python-oauth2
+.. _niQo: https://github.com/niQo
+.. _hassek: https://github.com/hassek
if setting('EVERNOTE_DEBUG', False):
- EVERNOTE_SERVER = "sandbox.evernote.com"
+ EVERNOTE_SERVER = 'sandbox.evernote.com'
else:
EVERNOTE_SERVER = 'www.evernote.com'
-EVERNOTE_REQUEST_TOKEN_URL = 'https://%s/oauth' % \
- EVERNOTE_SERVER
-EVERNOTE_ACCESS_TOKEN_URL = 'https://%s/oauth' % \
- EVERNOTE_SERVER
-EVERNOTE_AUTHORIZATION_URL = 'https://%s/OAuth.action' % \
- EVERNOTE_SERVER
+EVERNOTE_REQUEST_TOKEN_URL = 'https://%s/oauth' % EVERNOTE_SERVER
+EVERNOTE_ACCESS_TOKEN_URL = 'https://%s/oauth' % EVERNOTE_SERVER
+EVERNOTE_AUTHORIZATION_URL = 'https://%s/OAuth.action' % EVERNOTE_SERVER
class EvernoteBackend(OAuthBackend):
- """Evernote OAuth authentication backend
- Possible Values:
+ """
+ Evernote OAuth authentication backend.
+
+ Possible Values:
{'edam_expires': ['1367525289541'],
'edam_noteStoreUrl': ['https://sandbox.evernote.com/shard/s1/notestore'],
'edam_shard': ['s1'],
'edam_webApiUrlPrefix': ['https://sandbox.evernote.com/shard/s1/'],
'oauth_token': ['S=s1:U=1e3c1:E=13e66dbee45:C=1370f2ac245:P=185:A=my_user:H=411443c5e8b20f8718ed382a19d4ae38']}
"""
-
name = 'evernote'
EXTRA_DATA = [
def get_user_details(self, response):
"""Return user details from Evernote account"""
- return {USERNAME: response["edam_userId"],
- 'email': '',
- }
+ return {
+ USERNAME: response['edam_userId'],
+ 'email': '',
+ }
def get_user_id(self, details, response):
return response['edam_userId'][0]
response = self.fetch_response(request)
params = parse_qs(response)
- # evernote sents a empty secret token, this way it doesn't fires up the exception
- response = response.replace("oauth_token_secret=", "oauth_token_secret=None")
+ # evernote sents a empty secret token, this way it doesn't fires up the
+ # exception
+ response = response.replace('oauth_token_secret=',
+ 'oauth_token_secret=None')
token = Token.from_string(response)
token.user_info = params
return token
def user_data(self, access_token, *args, **kwargs):
- """Return user data provided """
-
+ """Return user data provided"""
# drop lists
return dict([(key, val[0]) for key, val in
access_token.user_info.items()])
+
# Backend definition
BACKENDS = {
'evernote': EvernoteAuth,