{ "info": { "author": "Narendra Choudhary", "author_email": "narendralegha.mail@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-iitg-auth\n================\n\n.. image:: https://img.shields.io/pypi/v/django-iitg-auth.svg?style=plastic\n :target: https://pypi.python.org/pypi/django-iitg-auth\n\n.. image:: https://travis-ci.org/narenchoudhary/django-iitg-auth.svg?branch=master\n :target: https://travis-ci.org/narenchoudhary/django-iitg-auth\n\n.. image:: https://codecov.io/gh/narenchoudhary/django-iitg-auth/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/narenchoudhary/django-iitg-auth\n\n\n``django-iitg-auth`` is a reusable Django application which provides\na custom authencation backend for authenticating with IIT Guwahati webmail servers,\na login form and a utility view.\n\nInstallation\n============\n\n``django-iitg-auth`` can be installed using following pip command.\n\n.. code-block:: python\n\n pip install django-iitg-auth\n\n\nUsage: Authentication Backend\n=============================\n\nAdd ``'iitgauth'`` to INSTALLED_APPS settings of the project.\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n 'django.contrib.admin',\n 'django.contrib.auth',\n ...\n ...\n 'iitgauth',\n ]\n\nAdd ``'iitgauth.auth.WebMailAuthenticationBackend'`` to ``AUTHENTICATION_BACKENDS`` in settings.py.\n\n.. code-block:: python\n\n AUTHENTICATION_BACKENDS = [\n 'django.contrib.auth.backends.ModelBackend',\n 'iitgauth.auth.WebMailAuthenticationBackend',\n ]\n\n\nThis is all the configuration required to use the webmail authentication backend.\n\n\nNote that ``authenticate`` method of the backend requires following credentials:\n * username\n * password\n * login server\n * port (default is set to 995)\n\nFollowing snippet shows how webmail authentication can be done in a custom view.\n\n.. code-block:: python\n\n from django.contrib.auth import authenticate\n from django.views.generic import View\n\n class LoginView(View):\n\n def get(self, request):\n # get request handling logic\n #\n\n def post(self, request):\n form = LoginForm(request.POST)\n if form.is_valid():\n username = form.cleaned_data('username')\n password = form.cleaned_data('password')\n login_server = form.cleaned_data('login_server')\n\n # open a socket to login server and query validity of credentials\n user = auth.authenticate(username=username, password=password,\n login_server=login_server, port=995)\n #\n # rest of authentication logic\n #\n else:\n # invalid form hadling\n\n\nUsage: ``WebmailLoginForm`` and ``WebmailLoginView``\n====================================================\nA ready-to-use form (``WebmailLoginForm``) and a class based view (``WebmailLoginView``) are also available.\nUsing this form and view is not necessary. You can write your own custom login form and view to use with\nwebmail authentication backend as explained above.\n\nThis form works exactly similar to Django's built-in AuthenticationForm_.\nOnly difference is ``WebmailLoginForm`` has one extra field, .i.e. Login Server field.\n\n``WebmailLoginForm`` has 3 fields:\n * username\n * password\n * login_server\n\n.. _AuthenticationForm: https://docs.djangoproject.com/en/1.10/topics/auth/default/#django.contrib.auth.forms.AuthenticationForm\n\n\n``WebmailLoginView`` is a FormView_ which renders ``WebmailLoginForm`` on GET and redirects to ``success_url`` on successful authentication.\n\n.. _FormView: https://docs.djangoproject.com/en/1.10/ref/class-based-views/generic-editing/#formview\n\n\nDemo\n====\n\n**Note:** There is a working demo project available under **example** directory.\n\n.. image:: demo.gif\n :height: 180 px\n :width: 320 px\n :alt: demo\n :align: left\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/narenchoudhary/django-iitg-auth", "keywords": "django library development authentication", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "django-iitg-auth", "package_url": "https://pypi.org/project/django-iitg-auth/", "platform": "", "project_url": "https://pypi.org/project/django-iitg-auth/", "project_urls": { "Homepage": "https://github.com/narenchoudhary/django-iitg-auth" }, "release_url": "https://pypi.org/project/django-iitg-auth/0.0.4/", "requires_dist": [ "Django (>=1.7)" ], "requires_python": "", "summary": "``django-iitg-auth`` is a reusable Django application which provides a custom authencation backend for authenticating with IIT Guwahati webmail servers, a login form and a utility view.", "version": "0.0.4" }, "last_serial": 3020672, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "138418bb8d667fb565f3d9c922dff3b2", "sha256": "92473f6f782c02f242d4d9fce25f17a8f7fe13e5355737e36d53cf2b431925ea" }, "downloads": -1, "filename": "django_iitg_auth-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "138418bb8d667fb565f3d9c922dff3b2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8058, "upload_time": "2017-03-16T23:40:06", "url": "https://files.pythonhosted.org/packages/39/56/08eca7e2b54e9d72f9d60c7bb651d5d939a95feefc0ecc96b1cd9e2fe19e/django_iitg_auth-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c31f5ff6d867dd9c07f2bc03c6acc5d5", "sha256": "80a907b4d2625a25033b45ec691691803ce8ef44aebe2567aecffffa786b52f8" }, "downloads": -1, "filename": "django-iitg-auth-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c31f5ff6d867dd9c07f2bc03c6acc5d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5524, "upload_time": "2017-03-16T23:40:08", "url": "https://files.pythonhosted.org/packages/0e/f5/b516ebeb6dd4d3bd935040f4c8178bdd100856619c86c67153d5ac3c48a3/django-iitg-auth-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d3e50f503752db768a7e2c2ce211460c", "sha256": "30e6fedb3ff0a9f794ef2078634db86e3086c4bdec2e202c863a517719dda57b" }, "downloads": -1, "filename": "django_iitg_auth-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d3e50f503752db768a7e2c2ce211460c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8058, "upload_time": "2017-03-16T23:55:29", "url": "https://files.pythonhosted.org/packages/e8/7e/814fc67ef403be736c2d5ef31e55b2d9ff0a2250820223f4f76fd794fed7/django_iitg_auth-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bed2a66bb467271382f4bea22dc069b9", "sha256": "f6e0c0f5e2f4d2c1a7f464008fc55513223c63ba5dc9bbb210c5f84f6dba6fbf" }, "downloads": -1, "filename": "django-iitg-auth-0.0.2.tar.gz", "has_sig": false, "md5_digest": "bed2a66bb467271382f4bea22dc069b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5525, "upload_time": "2017-03-16T23:55:31", "url": "https://files.pythonhosted.org/packages/09/08/6153cbef6a9273661bc8e19512d4fa6caa5a5176656c761659d39ff7dadf/django-iitg-auth-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f82a6d4a79a9391795c813676b553a56", "sha256": "b8dbe4f9c28c4dc8030ec37236838a0397029e20c99e7ed85673683a5246094c" }, "downloads": -1, "filename": "django-iitg-auth-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f82a6d4a79a9391795c813676b553a56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6098, "upload_time": "2017-03-23T08:23:13", "url": "https://files.pythonhosted.org/packages/a5/18/e3ab103697de50684803343ca66f320717ed36bddfd58ffa1eda4c421f32/django-iitg-auth-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "3f4ef775aa6618d9adc77ded1a842d6b", "sha256": "d854cc7b3faf7a12f135443b489545573c5498f860215200020f020c8574af66" }, "downloads": -1, "filename": "django_iitg_auth-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f4ef775aa6618d9adc77ded1a842d6b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8895, "upload_time": "2017-07-13T15:41:52", "url": "https://files.pythonhosted.org/packages/8e/33/5fbc90a481e105a3c8c922ec021481c0d5f43c206f09c0cc22501d438c8e/django_iitg_auth-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1cbffc59e81afa331fd3ff39a25dee0", "sha256": "dff29f27f523361ac09f5e81a60ca90e3e90a6ed49fbe7fc4dff839078fbde63" }, "downloads": -1, "filename": "django-iitg-auth-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c1cbffc59e81afa331fd3ff39a25dee0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6080, "upload_time": "2017-07-13T15:41:56", "url": "https://files.pythonhosted.org/packages/af/d3/ba5fb43ed004cbb4f87a289e72b8fa2047dad9f4b9a82b20e4a8eff69813/django-iitg-auth-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f4ef775aa6618d9adc77ded1a842d6b", "sha256": "d854cc7b3faf7a12f135443b489545573c5498f860215200020f020c8574af66" }, "downloads": -1, "filename": "django_iitg_auth-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f4ef775aa6618d9adc77ded1a842d6b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8895, "upload_time": "2017-07-13T15:41:52", "url": "https://files.pythonhosted.org/packages/8e/33/5fbc90a481e105a3c8c922ec021481c0d5f43c206f09c0cc22501d438c8e/django_iitg_auth-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1cbffc59e81afa331fd3ff39a25dee0", "sha256": "dff29f27f523361ac09f5e81a60ca90e3e90a6ed49fbe7fc4dff839078fbde63" }, "downloads": -1, "filename": "django-iitg-auth-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c1cbffc59e81afa331fd3ff39a25dee0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6080, "upload_time": "2017-07-13T15:41:56", "url": "https://files.pythonhosted.org/packages/af/d3/ba5fb43ed004cbb4f87a289e72b8fa2047dad9f4b9a82b20e4a8eff69813/django-iitg-auth-0.0.4.tar.gz" } ] }