From 1409f179799ce3ebb62333b7db4de868230347fc Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 11 Jan 2013 22:24:48 +0100 Subject: [PATCH] Add Oauth support (with django-social-auth) --- README.rst | 18 +++++++++++++++- requirements.pip | 1 + umap/settings/base.py | 19 +++++++++++++++++ umap/static/umap/bitbucket.png | Bin 0 -> 9125 bytes umap/static/umap/github.png | Bin 0 -> 1564 bytes umap/static/umap/twitter.png | Bin 0 -> 3225 bytes umap/static/umap/umap.css | 28 +++++++++++++++++++++++++ umap/templates/registration/login.html | 14 +++++++++++++ umap/templates/umap/home.html | 11 ++++++---- umap/urls.py | 1 + 10 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 umap/static/umap/bitbucket.png create mode 100644 umap/static/umap/github.png create mode 100644 umap/static/umap/twitter.png create mode 100644 umap/templates/registration/login.html diff --git a/README.rst b/README.rst index 03d81a06..af84f10b 100644 --- a/README.rst +++ b/README.rst @@ -40,6 +40,23 @@ Add database connexion informations in `local.py`, for example:: } } +uMap uses `django-social-auth `_ for user authentication. So you will need to configure it according to your +needs. For example:: + + AUTHENTICATION_BACKENDS = ( + 'social_auth.backends.contrib.github.GithubBackend', + 'social_auth.backends.contrib.bitbucket.BitbucketBackend', + 'social_auth.backends.twitter.TwitterBackend', + 'django.contrib.auth.backends.ModelBackend', + ) + GITHUB_APP_ID = 'xxx' + GITHUB_API_SECRET = 'zzz' + BITBUCKET_CONSUMER_KEY = 'xxx' + BITBUCKET_CONSUMER_SECRET = 'zzz' + TWITTER_CONSUMER_KEY = "xxx" + TWITTER_CONSUMER_SECRET = "yyy" + + Create the tables:: python manage.py syncdb --migrate @@ -56,4 +73,3 @@ Go to the admin (http://localhost:8000/admin/) and add: - almost one licence - almost one tilelayer -- maybe some users to play with diff --git a/requirements.pip b/requirements.pip index adf5870f..ea486af0 100644 --- a/requirements.pip +++ b/requirements.pip @@ -9,6 +9,7 @@ south django-leaflet-storage django_compressor django-foundation +django-social-auth git+git://github.com/yohanboniface/vectorformats.git@leafletstorage git+git://github.com/frankban/django-endless-pagination.git hg+https://bitbucket.org/liberation/sesql \ No newline at end of file diff --git a/umap/settings/base.py b/umap/settings/base.py index b084a8d5..9602ee39 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -3,6 +3,7 @@ """Base settings shared by all environments""" # Import global settings to make it easier to extend settings. from django.conf.global_settings import * # pylint: disable=W0614,W0401 +from django.template.defaultfilters import slugify #============================================================================== # Generic Django project settings @@ -34,6 +35,7 @@ INSTALLED_APPS = ( 'umap', 'sesql', 'compressor', + 'social_auth', 'south', @@ -113,6 +115,7 @@ TEMPLATE_DIRS = ( TEMPLATE_CONTEXT_PROCESSORS += ( 'django.core.context_processors.request', + 'social_auth.context_processors.social_auth_backends', ) #============================================================================== @@ -139,3 +142,19 @@ AUTHENTICATION_BACKENDS += ( #============================================================================== COMPRESS_ENABLED = True COMPRESS_OFFLINE = True + +SOCIAL_AUTH_ASSOCIATE_URL_NAME = "associate_complete" +SOCIAL_AUTH_DEFAULT_USERNAME = lambda u: slugify(u) +SOCIAL_AUTH_EXTRA_DATA = False +SOCIAL_AUTH_ASSOCIATE_BY_EMAIL = True +LOGIN_URL = "login" +SOCIAL_AUTH_LOGIN_REDIRECT_URL = "/login/popup/end/" +SOCIAL_AUTH_PIPELINE = ( + 'social_auth.backends.pipeline.social.social_auth_user', + 'social_auth.backends.pipeline.associate.associate_by_email', + 'social_auth.backends.pipeline.user.get_username', + 'social_auth.backends.pipeline.user.create_user', + 'social_auth.backends.pipeline.social.associate_user', + 'social_auth.backends.pipeline.social.load_extra_data', + 'social_auth.backends.pipeline.user.update_user_details' +) diff --git a/umap/static/umap/bitbucket.png b/umap/static/umap/bitbucket.png new file mode 100644 index 0000000000000000000000000000000000000000..32863151942eececa77ac1a715df84d6d21b154b GIT binary patch literal 9125 zcmbVyRaYAf(=9H+9fB8kC%C&yaCdhpP~2SuB)AuMx8fS0Xn_`YYq6(5OUu{yC!BLJ zd#{;`xtle!X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_T8jP7{=oi-I0QaZd6`Q1Q_3QD#Iz`||xAcx*g zc$)L}u`5+7y3$9~a|?22ukpQWd9fpx-kbN7n4omfiGw)c@?lk^U9UD(wwVOq~R#WbV#L-c4?!n)I;e2y1wtMPopns)qFO}eS_F}rHTll zL#R`-!5j@St}=kn+~>WAqMO}c57BYW!OC-sWQF>U4Mlq3a%WbvZcpY76H{M(bRv8j ztC!!Y)!10m_d+yd!Ezmm_YIQNcRo+ec~*#(rm79%1xMv&Nvj9d(Fb?_UsU)%3|9q~ o0{Ukh`oB}-f560t_pHmAWU2JpE9QKbej-42)=pLxr?H9u25rX+!vFvP literal 0 HcmV?d00001 diff --git a/umap/static/umap/umap.css b/umap/static/umap/umap.css index 0e6b9930..32bb1676 100644 --- a/umap/static/umap/umap.css +++ b/umap/static/umap/umap.css @@ -87,4 +87,32 @@ input:-moz-placeholder, :-moz-placeholder { height: 16px; margin-right: 10px; border: 1px solid #000; +} + +/* **************** */ +/* Login icons */ +/* **************** */ +/*.login-grid li { +} +*/ +.login-grid a { + border: 1px solid #e5e5e5; + padding: 5px; + color: #000; + background-position: center bottom; + background-repeat: no-repeat; + background-size: 92px 92px; + height: 92px; + width: 92px; + display: inline-block; + margin-right: 10px; +} +.login-grid .login-github { + background-image: url("./github.png"); +} +.login-grid .login-bitbucket { + background-image: url("./bitbucket.png"); +} +.login-grid .login-twitter { + background-image: url("./twitter.png"); } \ No newline at end of file diff --git a/umap/templates/registration/login.html b/umap/templates/registration/login.html new file mode 100644 index 00000000..b818aa68 --- /dev/null +++ b/umap/templates/registration/login.html @@ -0,0 +1,14 @@ +{% load i18n %} +{% load url from future %} + +
{% trans "Please choose a provider" %}
+ +
+ +
diff --git a/umap/templates/umap/home.html b/umap/templates/umap/home.html index 39f8da4e..5b51a6d8 100644 --- a/umap/templates/umap/home.html +++ b/umap/templates/umap/home.html @@ -68,11 +68,14 @@ {% trans "Fork it" %} -
-

- {% trans "Users to play with" %} (password: 123123): {% for u in users %}{{ u }}{% if not forloop.last %}, {% endif %}{% endfor %} -

+ + {% if not user.is_authenticated %} + + {% endif %}
diff --git a/umap/urls.py b/umap/urls.py index e0904510..96519d60 100644 --- a/umap/urls.py +++ b/umap/urls.py @@ -15,6 +15,7 @@ urlpatterns = patterns('', url(r'^$', views.home, name="home"), url(r'^search/$', views.search, name="search"), url(r'^user/(?P[-_\w]+)/$', views.user_maps, name='user_maps'), + url(r'', include('social_auth.urls')), (r'', include('leaflet_storage.urls')), )