{
"info": {
"author": "cof-geek",
"author_email": "cof-geek@ens.fr",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 1.10",
"Framework :: Django :: 1.11",
"Framework :: Django :: 1.8",
"Framework :: Django :: 1.9",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Internet :: WWW/HTTP"
],
"description": "##################\ndjango-allauth-ens\n##################\n\nThis package is meant to ease the management of authentication of django-apps\nat the ENS.\n\nOn top of django-allauth_, which provides easy ways to configure the\nauthentication of django-apps, this package provides:\n\n* social authentication using Clipper (*cas.eleves*);\n\n* ready-to-use templates in replacement of allauth' ones;\n\n* helpers to use *allauth*'s login and logout views instead of those\n provided by third-parties (Django admin, wagtail, *etc*).\n\n\n**Contents**\n\n.. contents:: :local:\n\n\n************\nInstallation\n************\n\nFirst, `install django-allauth`_.\n\nThen, install *django-allauth-ens*:\n\n.. code-block:: bash\n\n $ pip install django-allauth-ens\n\nAnd edit your settings file:\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n # \u2026\n\n # Above allauth to replace its templates.\n 'allauth_ens',\n\n # Added when you installed allauth.\n 'allauth',\n 'allauth.account',\n 'allauth.socialaccount',\n\n # Required to use CAS-based providers (e.g. Clipper).\n 'allauth_cas',\n\n # \u2026\n ]\n\n\n*************\nConfiguration\n*************\n\nSee also the `allauth configuration`_ and `advanced usage`_ docs pages.\n\n``ACCOUNT_HOME_URL``\n *Optional* \u2014 A view name or an url path.\n\n Used as a link from the templates of ``allauth_ens`` to return to your\n application.\n\n **Examples:** ``'home'``, ``'/home/'``\n\n``ACCOUNT_DETAILS_URL``\n *Optional* \u2014 A view name or an url path.\n\n Used as a link from the templates of ``allauth_ens`` for a logged in user to\n access their profile in your app.\n\n **Examples:** ``'my-account'``, ``'/my-account/'``\n\n``ALLAUTH_ENS_HIGHLIGHT_CLIPPER``\n *Optional* \u2014 Boolean (default: `True`).\n\n When set to `True`, displays prominently the Clipper option in the login view\n (if you use the `allauth_ens` templates).\n\n\n*****\nViews\n*****\n\nCapture other login and logout views\n====================================\n\nYou can use the ``capture_login`` and ``capture_logout`` views to replace the\nlogin and logout views of other applications. They redirect to their similar\n*allauth*'s view and forward the query string, so that if a GET parameter\n``next`` is given along the initial request, user is redirected to this url on\nsuccessful login and logout.\n\nThis requires to add urls before the include of the app' urls.\n\nFor example, to replace the Django admin login and logout views with allauth's\nones:\n\n.. code-block:: python\n\n from allauth_ens.views import capture_login, capture_logout\n\n urlpatterns = [\n # \u2026\n\n # Add it before include of admin urls.\n url(r'^admin/login/$', capture_login),\n url(r'^admin/logout/$', capture_logout),\n\n url(r'^admin/$', include(admin.site.urls)),\n\n # \u2026\n ]\n\n\n*********\nTemplates\n*********\n\nThe templates provided by *allauth* only contains the bare minimum. Hopefully,\nthis package includes ready-to-use templates. They are automatically used if\nyou put ``'allauth_ens'`` before ``'allauth'`` in your ``INSTALLED_APPS``,\n\n\n*********\nProviders\n*********\n\n*Google, Facebook\u00b8 but also Clipper\u2026*\n\nTo interact with an external authentication service, you must add the\ncorresponding provider application to your ``INSTALLED_APPS``.\n\n*allauth* already includes `several providers`_ (see also `their python path`_).\nIn addition to that, this package adds the following providers:\n\nClipper\n=======\n\nIt uses the CAS server ``_.\n\nInstallation\n Add\u00a0``'allauth_ens.providers.clipper'`` to the ``INSTALLED_APPS``.\n\nConfiguration\n Available settings and their default value:\n\n .. code-block:: python\n\n SOCIALACCOUNT_PROVIDERS = {\n # \u2026\n 'clipper': {\n # These settings control whether a message containing a link to\n # disconnect from the CAS server is added when users log out.\n 'MESSAGE_SUGGEST_LOGOUT_ON_LOGOUT': True,\n 'MESSAGE_SUGGEST_LOGOUT_ON_LOGOUT_LEVEL': messages.INFO,\n },\n }\n\nAuto-signup\n Populated data\n - username: ````\n - email (primary and verified): ``@clipper.ens.fr``\n\n********\nAdapters\n********\n\nLong Term Clipper Adapter\n=========================\n\nWe provide an easy-to-use SocialAccountAdapter to handle the fact that Clipper\naccounts are not eternal, and that there is no guarantee that the clipper\nusernames won't be reused later.\n\nThis adapter also handles getting basic information about the user from SPI's\nLDAP.\n\n**Important:** If you are building on top of *allauth*, take care to preserve\nthe ``extra_data['ldap']`` of ``SocialAccount`` instances related to *Clipper*\n(where ``provider_id`` is ``clipper`` or ``clipper_inactive``).\n\nConfiguration\n Set ``SOCIALACCOUNT_ADAPTER='allauth_ens.adapter.LongTermClipperAccountAdapter'``\n in `settings.py`\n\nAuto-signup\n Populated data\n - *username*: ``@``\n - *email*: from LDAP's *mailRoutingAddress* field, or ``@clipper.ens.fr``\n - *first_name*, *last_name* from LDAP's *cn* field\n - *entrance_year* (as 2-digit string), *department_code*, *department* and *promotion* (department+year) parsed from LDAP's *homeDirectory* field\n - *extra_data* in SocialAccount instance, containing all these field except *promotion* (and available only on first connection)\n\nAccount deprecation\n At the beginning of each year (i.e. early November), to prevent clipper\n username conflicts, you should run ``$ python manage.py deprecate_clippers``.\n Every association clipper username <-> user will then be put on hold, and at\n the first subsequent connection, a verification of the account will be made\n (using LDAP), so that a known user keeps his account, but a newcomer won't\n inherit an archicube's.\n\nCustomize\n You can customize the SocialAccountAdapter by inheriting\n ``allauth_ens.adapter.LongTermClipperAccountAdapter``. You might want to\n modify ``get_username(clipper, data)`` to change the default username format.\n By default, ``get_username`` raises a ``ValueError`` when the connexion to the\n LDAP failed or did not allow to retrieve the user's entrance year. Overriding\n ``get_username`` (as done in the example website) allows to get rid of that\n behaviour, and for instance attribute a default entrance year.\n\nInitial migration\n Description\n If you used allauth without LongTermClipperAccountAdapter, or another CAS\n interface to log in, you need to update the Users to the new username policy,\n and (in the second case) to create the SocialAccount instances to link CAS and\n Users. This can be done easily with ``$ python manage.py install_longterm``.\n\n Install_longterm options\n - ``--use-socialaccounts``: Use the existing SocialAccounts rather than all the Users. Useful if you are already using Allauth and don't want ``install_longterm`` to mess with the non-clipper authentications.\n - ``--keep-usernames``: Do not apply the username template (e.g. ``clipper@promo``) to the existing accounts, only populate the SocialAccounts with LDAP informations. Useful if you don't want to change the usernames of previous users, but do want such a template for future accounts.\n - ``--clipper-field ``: Use a special field rather than the username to get the clipper username (for LDAP lookup and SocialAccount creation/update). This parameter is compatible with ForeignKeys (e.g. ``profile.clipper``). Note: ``--use-socialaccounts`` will ignore the ``--clipper-field`` parameter.\n - ``--fake``: Do not modify the database. Use it to test there is no conflict, and be sure the changes are the ones expected. This command does not check for uniqueness errors, so there it may succeed and the actual command fail eventually.\n\n Typical use cases\n - *Django-cas-ng -> Longterm*: Use ``install_longterm`` without parameters, or maybe ``--keep-usernames``. If you had a custom username handling, ``--clipper_field`` may be useful.\n - *Allauth -> Longterm*: Use ``install_longterm`` with ``--use-socialaccounts``, and maybe ``--keep-usernames``.\n\n\n*********\nDemo Site\n*********\n\nSee ``example/README``.\n\n\n***********\nDevelopment\n***********\n\nFirst, you need to clone the repository.\n\nStylesheets\n===========\n\nThis project uses `compass`_ to compile SCSS files to CSS.\n\nUsing bundler\n-------------\n\nRequirements\n * Ensure Ruby is installed (``$ ruby -v``) or `install Ruby`_\n * Ensure bundler is installed (``$ bundle -v``) or install bundler\n (``$ gem install bundler``)\n * Install dependencies: ``$ bundle install``\n\nCompile\n * Watch changes and recompile: ``$ bundle exec compass watch``\n\nTests\n=====\n\nLocal environment\n-----------------\n\nRequirements\n * fakeldap and mock, install with ``$ pip install mock fakeldap``\n\nRun\n * ``$ ./runtests.py``\n\nAll\n---\n\nRequirements\n * tox, install with ``$ pip install tox``\n * ``python{2.7,3.4,3.5,3.6}`` must be available on your system path\n\nRun\n * all (django/python with combined coverage + flake8 + isort): ``$ tox``\n\n\n******\nHowtos\n******\n\nAssuming you use the following settings (when needed):\n\n.. code-block:: python\n\n ACCOUNT_ADAPTER = 'shared.allauth_adapter.AccountAdapter'\n SOCIALACCOUNT_ADAPTER = 'shared.allauth_adapter.SocialAccountAdapter'\n\nSignup disabled, except for clipper provider (auto-signup)\n==========================================================\n\nIn ``shared/allauth_adapter.py``:\n\n.. code-block:: python\n\n class AccountAdapter(DefaultAccountAdapter):\n def is_open_for_signup(self, request):\n return False\n\n class SocialAccountAdapter(DefaultSocialAccountAdapter):\n def is_open_for_signup(self, request, sociallogin):\n # sociallogin.account is a SocialAccount instance.\n # See https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/models.py\n\n if sociallogin.account.provider == 'clipper':\n return True\n\n # It returns AccountAdapter.is_open_for_signup().\n # See https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/adapter.py\n return super().is_open_for_signup(request, sociallogin)\n\n\n.. _django-allauth: https://django-allauth.readthedocs.io/en/latest/overview.html\n.. _install django-allauth: https://django-allauth.readthedocs.io/en/latest/installation.html\n.. _several providers: https://django-allauth.readthedocs.io/en/latest/providers.html\n.. _allauth configuration: https://django-allauth.readthedocs.io/en/latest/configuration.html\n.. _advanced usage: https://django-allauth.readthedocs.io/en/latest/advanced.html\n.. _their python path: https://django-allauth.readthedocs.io/en/latest/installation.html\n.. _compass: https://compass-style.org/\n.. _install Ruby: https://www.ruby-lang.org/en/documentation/installation/\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://git.eleves.ens.fr/cof-geek/django-allauth-ens",
"keywords": "django allauth cas authentication",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "django-allauth-ens",
"package_url": "https://pypi.org/project/django-allauth-ens/",
"platform": "",
"project_url": "https://pypi.org/project/django-allauth-ens/",
"project_urls": {
"Homepage": "https://git.eleves.ens.fr/cof-geek/django-allauth-ens"
},
"release_url": "https://pypi.org/project/django-allauth-ens/1.1.2/",
"requires_dist": [
"django-allauth",
"django-allauth-cas (<1.1,>=1.0)",
"python-cas (==1.2.0)",
"django-widget-tweaks",
"python-ldap"
],
"requires_python": "",
"summary": "Providers for django-allauth allowing using the ENS' auth-systems.",
"version": "1.1.2"
},
"last_serial": 4665587,
"releases": {
"0.0.1.dev1": [
{
"comment_text": "",
"digests": {
"md5": "688d3dc5f5c7424e6ef11b5765f14abd",
"sha256": "9524dc8bb4eb8f7053576aa57f43a65eea52eb2a11b957c7dd14e240313eb744"
},
"downloads": -1,
"filename": "django-allauth-ens-0.0.1.dev1.tar.gz",
"has_sig": false,
"md5_digest": "688d3dc5f5c7424e6ef11b5765f14abd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 66305,
"upload_time": "2017-10-18T14:50:55",
"url": "https://files.pythonhosted.org/packages/d9/99/4bef933f802b7266f0dfffb0a3ba2e77a282230bcc21752f9fd0079b2113/django-allauth-ens-0.0.1.dev1.tar.gz"
}
],
"1.0.0b1": [
{
"comment_text": "",
"digests": {
"md5": "c5033889974672d30f1707927f9f5266",
"sha256": "132c470b47f51551923488f141509e8c3019b3c1fba91e6f81d0677e8373fe8f"
},
"downloads": -1,
"filename": "django-allauth-ens-1.0.0b1.tar.gz",
"has_sig": false,
"md5_digest": "c5033889974672d30f1707927f9f5266",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 63085,
"upload_time": "2018-01-16T15:59:34",
"url": "https://files.pythonhosted.org/packages/46/48/0181bd04ebd917b119219c746f38f13a6c8c893234725baaf8de960db5ca/django-allauth-ens-1.0.0b1.tar.gz"
}
],
"1.0.0b2": [
{
"comment_text": "",
"digests": {
"md5": "b01f7897fd5ae2da2d6e3a4325f1cda5",
"sha256": "8f2ee40fac8603db473a5d99057c3c3d6a28d0881f90d9629121c701d86e3d11"
},
"downloads": -1,
"filename": "django-allauth-ens-1.0.0b2.tar.gz",
"has_sig": false,
"md5_digest": "b01f7897fd5ae2da2d6e3a4325f1cda5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 65446,
"upload_time": "2018-01-25T21:53:54",
"url": "https://files.pythonhosted.org/packages/58/01/1087517cff95d942b56b71a682f36ce2be337e5adc4dc15d2252bca8fe79/django-allauth-ens-1.0.0b2.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "274896f342444ed79ab5e419227e33bb",
"sha256": "df4c703c29edeeebf68a59be11b85479b9516de5ea421233db45bde8a8fe2503"
},
"downloads": -1,
"filename": "django_allauth_ens-1.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "274896f342444ed79ab5e419227e33bb",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 694617,
"upload_time": "2018-09-29T22:56:18",
"url": "https://files.pythonhosted.org/packages/6e/2d/744803b3acf5aaf61f3e2b9b23a80c67482e12f0c9e2f6a4630f6160837f/django_allauth_ens-1.1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "6239481af658bbd387baa649e29cf9f5",
"sha256": "0f5d717f53f15e393682fff1f74d34b42a0aa6864c056e72813ebb61aa505062"
},
"downloads": -1,
"filename": "django-allauth-ens-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "6239481af658bbd387baa649e29cf9f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 683055,
"upload_time": "2018-09-29T22:56:21",
"url": "https://files.pythonhosted.org/packages/d8/2f/5adc392de2b559bcab5ee93cc60e14ff4aedfcd1cff6aff62e8f93e694a9/django-allauth-ens-1.1.0.tar.gz"
}
],
"1.1.1": [
{
"comment_text": "",
"digests": {
"md5": "5b165de1a3f00d833d5a4400b21f5900",
"sha256": "1f074fcb326e7dd412ed61f0d044c464cd4fa82fc00e8bae41212c5b1a9d58ee"
},
"downloads": -1,
"filename": "django_allauth_ens-1.1.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5b165de1a3f00d833d5a4400b21f5900",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 690199,
"upload_time": "2018-10-21T14:11:31",
"url": "https://files.pythonhosted.org/packages/f4/f3/cb1e2623f57655a2e3b8bfd6734d6ed866766209fe36a5018db2e2ffaa8b/django_allauth_ens-1.1.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "3105ccee2bd2c492d91bcd935f2f05b7",
"sha256": "7ec92ff5bee17694f2c0ec1f077ab53a56dddad30b3202bfcffe20fc5643bdbd"
},
"downloads": -1,
"filename": "django-allauth-ens-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "3105ccee2bd2c492d91bcd935f2f05b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 683230,
"upload_time": "2018-10-21T14:11:33",
"url": "https://files.pythonhosted.org/packages/9a/e8/adaff833ea506afda17ab6aa5f124236cb1c9a68439e6e89bab2ab3186e4/django-allauth-ens-1.1.1.tar.gz"
}
],
"1.1.2": [
{
"comment_text": "",
"digests": {
"md5": "5be01cd467757ea10a6e92dec688b36c",
"sha256": "21a9a48713cb81789ccbe0981c45c0b78aa56009561e64f169eb39b6177586c9"
},
"downloads": -1,
"filename": "django_allauth_ens-1.1.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5be01cd467757ea10a6e92dec688b36c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 692338,
"upload_time": "2019-01-06T13:16:12",
"url": "https://files.pythonhosted.org/packages/49/b4/0ab6b7c87bdc9dab1aa6e3bc564b05f09570eea945fe059f1d72d174b5f9/django_allauth_ens-1.1.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "91bb46e9e8322f1db69fba4b41ebbf04",
"sha256": "a39f1564aa3e64879d880da507ecd512d9369950752f25982cb7efc83cd4dbdd"
},
"downloads": -1,
"filename": "django-allauth-ens-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "91bb46e9e8322f1db69fba4b41ebbf04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 683361,
"upload_time": "2019-01-06T13:16:17",
"url": "https://files.pythonhosted.org/packages/1c/0c/4a8e47ca0cbfc16f4d9f8de1f6738ba4d213773c1911d5889dedcef14038/django-allauth-ens-1.1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "5be01cd467757ea10a6e92dec688b36c",
"sha256": "21a9a48713cb81789ccbe0981c45c0b78aa56009561e64f169eb39b6177586c9"
},
"downloads": -1,
"filename": "django_allauth_ens-1.1.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5be01cd467757ea10a6e92dec688b36c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 692338,
"upload_time": "2019-01-06T13:16:12",
"url": "https://files.pythonhosted.org/packages/49/b4/0ab6b7c87bdc9dab1aa6e3bc564b05f09570eea945fe059f1d72d174b5f9/django_allauth_ens-1.1.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "91bb46e9e8322f1db69fba4b41ebbf04",
"sha256": "a39f1564aa3e64879d880da507ecd512d9369950752f25982cb7efc83cd4dbdd"
},
"downloads": -1,
"filename": "django-allauth-ens-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "91bb46e9e8322f1db69fba4b41ebbf04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 683361,
"upload_time": "2019-01-06T13:16:17",
"url": "https://files.pythonhosted.org/packages/1c/0c/4a8e47ca0cbfc16f4d9f8de1f6738ba4d213773c1911d5889dedcef14038/django-allauth-ens-1.1.2.tar.gz"
}
]
}