[Python-modules-commits] [python-social-auth] 57/322: Removed Orkut backend

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:12:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.10
in repository python-social-auth.

commit d0872f7dc15a4d5dfc7a51ea86a4b8bd8ec8cf71
Author: Lukas Klein <lukas at productgang.com>
Date:   Mon Nov 24 19:52:08 2014 +0100

    Removed Orkut backend
    
    As of September 30, 2014, Orkut [has been shut down](https://support.google.com/orkut/?hl=en), so there's no need for the corresponding backend anymore.
---
 README.rst                                  |  2 --
 docs/backends/google.rst                    | 22 ++-----------
 docs/backends/oauth.rst                     |  4 +--
 docs/intro.rst                              |  2 --
 examples/django_example/example/settings.py |  1 -
 social/backends/orkut.py                    | 50 -----------------------------
 6 files changed, 4 insertions(+), 77 deletions(-)

diff --git a/README.rst b/README.rst
index 2e03140..e4a0488 100644
--- a/README.rst
+++ b/README.rst
@@ -92,7 +92,6 @@ or current ones extended):
     * OpenId_
     * OpenStreetMap_ OAuth1 http://wiki.openstreetmap.org/wiki/OAuth
     * OpenSuse_ OpenId http://en.opensuse.org/openSUSE:Connect
-    * Orkut_ OAuth1
     * PixelPin_ OAuth2
     * Pocket_ OAuth2
     * Podio_ OAuth2
@@ -255,7 +254,6 @@ check `django-social-auth LICENSE`_ for details:
 .. _Mixcloud: https://www.mixcloud.com
 .. _Mozilla Persona: http://www.mozilla.org/persona/
 .. _Odnoklassniki: http://www.odnoklassniki.ru
-.. _Orkut: http://www.orkut.com
 .. _Pocket: http://getpocket.com
 .. _Podio: https://podio.com
 .. _Shopify: http://shopify.com
diff --git a/docs/backends/google.rst b/docs/backends/google.rst
index 32b1ed4..aa1c970 100644
--- a/docs/backends/google.rst
+++ b/docs/backends/google.rst
@@ -133,24 +133,7 @@ whitelists can be applied too, check the whitelists_ settings for details.
 Orkut
 -----
 
-Orkut offers per application keys named ``Consumer Key`` and ``Consumer Secret``.
-To enable Orkut these two keys are needed.
-
-Check `Google support`_ and `Orkut API`_ for details on getting keys.
-
-- fill ``Consumer Key`` and ``Consumer Secret`` values::
-
-      SOCIAL_AUTH_ORKUT_KEY = ''
-      SOCIAL_AUTH_ORKUT_SECRET = ''
-
-- add any needed extra data to::
-
-      SOCIAL_AUTH_ORKUT_EXTRA_DATA = [...]
-
-- configure extra scopes in::
-
-      SOCIAL_AUTH_ORKUT_SCOPE = [...]
-
+As of September 30, 2014, Orkut has been `shut down`_.
 
 User identification
 -------------------
@@ -214,14 +197,13 @@ supporting them you can default to the old values by defining this setting::
     SOCIAL_AUTH_GOOGLE_PLUS_USE_DEPRECATED_API = True
 
 .. _Google support: http://www.google.com/support/a/bin/answer.py?hl=en&answer=162105
-.. _Orkut API:  http://code.google.com/apis/orkut/docs/rest/developers_guide_protocol.html#Authenticating
 .. _Google OpenID: http://code.google.com/apis/accounts/docs/OpenID.html
 .. _Google OAuth: http://code.google.com/apis/accounts/docs/OAuth.html
 .. _Google OAuth2: http://code.google.com/apis/accounts/docs/OAuth2.html
 .. _OAuth2 Registering: http://code.google.com/apis/accounts/docs/OAuth2.html#Registering
 .. _OAuth2 draft: http://tools.ietf.org/html/draft-ietf-oauth-v2-10
 .. _OAuth reference: http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth
-.. _Orkut OAuth:  http://code.google.com/apis/orkut/docs/rest/developers_guide_protocol.html#Authenticating
+.. _shut down: https://support.google.com/orkut/?csw=1#Authenticating
 .. _Google Data Protocol Directory: http://code.google.com/apis/gdata/docs/directory.html
 .. _whitelists: ../configuration/settings.html#whitelists
 .. _Google+ Sign In: https://developers.google.com/+/web/signin/
diff --git a/docs/backends/oauth.rst b/docs/backends/oauth.rst
index 64e593b..44b1137 100644
--- a/docs/backends/oauth.rst
+++ b/docs/backends/oauth.rst
@@ -2,8 +2,8 @@ OAuth
 =====
 
 OAuth_ communication demands a set of keys exchange to validate the client
-authenticity prior to user approbation. Twitter, Facebook and Orkut
-facilitates these keys by application registration, Google works the same,
+authenticity prior to user approbation. Twitter, and Facebook facilitates
+these keys by application registration, Google works the same,
 but provides the option for unregistered applications.
 
 Check next sections for details.
diff --git a/docs/intro.rst b/docs/intro.rst
index 623e580..8e12826 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -62,7 +62,6 @@ or extend current one):
     * `Mozilla Persona`_
     * Odnoklassniki_ OAuth2 and Application Auth
     * OpenId_
-    * Orkut_ OAuth1
     * Podio_ OAuth2
     * Rdio_ OAuth1 and OAuth2
     * Readability_ OAuth1
@@ -140,7 +139,6 @@ section.
 .. _Mixcloud: https://www.mixcloud.com
 .. _Mozilla Persona: http://www.mozilla.org/persona/
 .. _Odnoklassniki: http://www.odnoklassniki.ru
-.. _Orkut: http://www.orkut.com
 .. _Podio: https://podio.com
 .. _Shopify: http://shopify.com
 .. _Skyrock: https://skyrock.com
diff --git a/examples/django_example/example/settings.py b/examples/django_example/example/settings.py
index edd1b66..492cb19 100644
--- a/examples/django_example/example/settings.py
+++ b/examples/django_example/example/settings.py
@@ -162,7 +162,6 @@ AUTHENTICATION_BACKENDS = (
     'social.backends.odnoklassniki.OdnoklassnikiOAuth2',
     'social.backends.open_id.OpenIdAuth',
     'social.backends.openstreetmap.OpenStreetMapOAuth',
-    'social.backends.orkut.OrkutOAuth',
     'social.backends.persona.PersonaAuth',
     'social.backends.podio.PodioOAuth2',
     'social.backends.rdio.RdioOAuth1',
diff --git a/social/backends/orkut.py b/social/backends/orkut.py
deleted file mode 100644
index aa5053c..0000000
--- a/social/backends/orkut.py
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Orkut OAuth backend, docs at:
-    http://psa.matiasaguirre.net/docs/backends/google.html#orkut
-"""
-from social.backends.google import GoogleOAuth
-
-
-class OrkutOAuth(GoogleOAuth):
-    """Orkut OAuth authentication backend"""
-    name = 'orkut'
-    DEFAULT_SCOPE = ['http://orkut.gmodules.com/social/']
-
-    def get_user_details(self, response):
-        """Return user details from Orkut account"""
-        try:
-            emails = response['emails'][0]['value']
-        except (KeyError, IndexError):
-            emails = ''
-
-        fullname, first_name, last_name = self.get_user_names(
-            fullname=response['displayName'],
-            first_name=response['name']['givenName'],
-            last_name=response['name']['familyName']
-        )
-        return {'username': response['displayName'],
-                'email': emails,
-                'fullname': fullname,
-                'first_name': first_name,
-                'last_name': last_name}
-
-    def user_data(self, access_token, *args, **kwargs):
-        """Loads user data from Orkut service"""
-        fields = ','.join(set(['name', 'displayName', 'emails'] +
-                          self.setting('EXTRA_DATA', [])))
-        scope = self.DEFAULT_SCOPE + self.setting('SCOPE', [])
-        params = {'method': 'people.get',
-                  'id': 'myself',
-                  'userId': '@me',
-                  'groupId': '@self',
-                  'fields': fields,
-                  'scope': self.SCOPE_SEPARATOR.join(scope)}
-        url = 'http://www.orkut.com/social/rpc'
-        request = self.oauth_request(access_token, url, params)
-        return self.get_json(request.to_url())['data']
-
-    def oauth_request(self, token, url, params=None):
-        params = params or {}
-        scope = self.DEFAULT_SCOPE + self.setting('SCOPE', [])
-        params['scope'] = self.SCOPE_SEPARATOR.join(scope)
-        return super(OrkutOAuth, self).oauth_request(token, url, params)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git



More information about the Python-modules-commits mailing list