[Python-modules-commits] [python-social-auth] 48/89: Add to readme
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:15:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.15
in repository python-social-auth.
commit 940095fd734a01177c51714733610a6452f8c171
Author: Julian Bez <julian.bez at gmail.com>
Date: Fri Feb 19 10:29:42 2016 +0100
Add to readme
---
README.rst | 2 ++
docs/backends/index.rst | 1 +
docs/backends/itembase.rst | 17 +++++++++++++++++
3 files changed, 20 insertions(+)
diff --git a/README.rst b/README.rst
index 03df9cd..0ce0c60 100644
--- a/README.rst
+++ b/README.rst
@@ -78,6 +78,7 @@ or current ones extended):
* Github_ OAuth2
* Google_ OAuth1, OAuth2 and OpenId
* Instagram_ OAuth2
+ * Itembase_ OAuth2
* Jawbone_ OAuth2 https://jawbone.com/up/developer/authentication
* Kakao_ OAuth2 https://developer.kakao.com
* `Khan Academy`_ OAuth1
@@ -256,6 +257,7 @@ check `django-social-auth LICENSE`_ for details:
.. _Github: https://github.com
.. _Google: http://google.com
.. _Instagram: https://instagram.com
+.. _Itembase: https://www.itembase.com
.. _LaunchPad: https://help.launchpad.net/YourAccount/OpenID
.. _Linkedin: https://www.linkedin.com
.. _Live: https://live.com
diff --git a/docs/backends/index.rst b/docs/backends/index.rst
index 3d6b7e6..e47812b 100644
--- a/docs/backends/index.rst
+++ b/docs/backends/index.rst
@@ -80,6 +80,7 @@ Social backends
github_enterprise
google
instagram
+ itembase
jawbone
justgiving
kakao
diff --git a/docs/backends/itembase.rst b/docs/backends/itembase.rst
index 075a335..715d1b4 100644
--- a/docs/backends/itembase.rst
+++ b/docs/backends/itembase.rst
@@ -30,5 +30,22 @@ Itembase uses OAuth2 for authentication.
'connection.profile',
'connection.buyer']
SOCIAL_AUTH_ITEMBASE_SANDBOX_SCOPE = SOCIAL_AUTH_ITEMBASE_SCOPE
+
+To use data from the extra scopes, you need to do an extra activation step
+that is not in the usual OAuth flow. For that you can extend your pipeline and
+add a function that sends the user to an activation URL that Itembase provides.
+The method to retrieve the activation data is included in the backend::
+
+ @partial
+ def activation(strategy, backend, response, *args, **kwargs):
+ if backend.name.startswith("itembase"):
+
+ if strategy.session_pop('itembase_activation_in_progress'):
+ strategy.session_set('itembase_activated', True)
+
+ if not strategy.session_get('itembase_activated'):
+ activation_data = backend.activation_data(response)
+ strategy.session_set('itembase_activation_in_progress', True)
+ return HttpResponseRedirect(activation_data['activation_url'])
.. _Itembase API: http://developers.itembase.com/authentication/index
--
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