{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# Yet Another Implementation of OTP for Django\n\n[![CI]][CI Link] [![CovSt]][CovStLink] [![GPA]][GPALink]\n\n[CI]: https://travis-ci.org/hiroaki-yamamoto/django-good-otp.svg?branch=master\n[CI Link]: https://travis-ci.org/hiroaki-yamamoto/django-good-otp\n[CovSt]: https://coveralls.io/repos/github/hiroaki-yamamoto/django-good-otp/badge.svg?branch=master\n[CovStLink]: https://coveralls.io/github/hiroaki-yamamoto/django-good-otp?branch=master\n[GPA]: https://codeclimate.com/github/hiroaki-yamamoto/django-good-otp/badges/gpa.svg\n[GPALink]: https://codeclimate.com/github/hiroaki-yamamoto/django-good-otp\n\n## What This?\n\nThis script is \"Yet Another Implementation\" of 2 factor authentication.\n\n## Why I re-invent?\n\nFirst, I tried [Django OTP], but 2 FA code is required though it should be\noptional. Moreover, Admin Panel to edit/fix secret key is not provided.\n\nThen, I tried [django-two-factor-auth], but I found it is the wrapper of\n[Django OTP] that requires 2FA code to the user who doesn't have 2FA enabled.\n\n[Django OTP]: https://bitbucket.org/psagers/django-otp\n[django-two-factor-auth]: https://github.com/Bouke/django-two-factor-auth\n\n## How to use\n\n1. Install this script. There's [pip package] and you can install it by\n `pip install django_good_otp`.\n2. Create a Django project as usual.\n3. Edit settings.py. You will need to edit INSTALLED_APPS and\n AUTHENTICATION_BACKENDS. For detail, refer **Edit Settings** section.\n4. Run migration as usual.\n5. Edit `url.py` of your root URL config to enable QR Code.\n For details, Check out **URL Routing** section.\n6. To enable admin panel, you will need to write very small code.\n For details, Check out **Enable Admin Panel** section.\n7. To use 2FA on Admin panel login, you will also need to write very simple\n code. For details, Check out **Enable Admin Panel** section.\n\n[pip package]: https://pypi.python.org/pypi/django_good_otp\n\n## Edit settings\n\nYou will need to edit configuration such settings.py. The variable to edit\nis `INSTALLED_APPS` and `AUTHENTICATION_BACKENDS`.\n\n### INSTALLED_APPS\n\nYou will just need to add `'django_otp.DjangoOTP'`\nafter `'django.contrib.auth'` i.e. it should be like this:\n\n`settings.py`\n```python\nINSTALLED_APPS = [\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n \"django_otp.DjangoOTP\"\n]\n```\n\nNote that this depends on the case. i.e. If you have more apps\ninstalled/uninstalled, your `INSTALLED_APPS` list might be longer/shorter than\nthis.\n\n### AUTHENTICATION_BACKENDS\n\nTo use 2 FA, you will need to replace authentication backend with the backend\nthis module provides. i.e. just set `AUTHENTICATION_BACKENDS` in `settings.py`\nto `(\"django_otp.backends.OTPAuthBackend\", )`. i.e. like this:\n\n`settings.py`\n```python\nAUTHENTICATION_BACKENDS = (\"django_otp.backends.OTPAuthBackend\", )\n```\n\n## URL Routing\n\nThis module supports QRCode to transfer Secret Key to your device. To\nuse it, you will need to add `django_otp.urls` with `include` function\nlike this:\n\n`urls.py`\n```python\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\n\nurlpatterns = [\n url(r'^admin/', admin.site.urls),\n url(r'^qr/', include(\"django_otp.urls\"))\n]\n```\n\n## Enable Admin Panel\n\n### Admin Panel\n\nBy default, Admin Panel of the model that stores secret key is **disabled**.\nTo enable Admin Panel, you will need to call `OTPAdmin.enable()` method like\nthis:\n\n`urls.py`\n```python\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\nfrom django_otp.admin import OTPAdmin\n\nOTPAdmin.enable()\n\nurlpatterns = [\n url(r'^admin/', admin.site.urls),\n url(r'^qr/', include(\"django_otp.urls\"))\n]\n```\n\n### Using 2FA form on adminsite\n\nUnfortunately, login template of administration site doesn't handle custom\nlogin form. Therefore, to use 2FA-ready admin form, you will need to replace\n`admin.site` with `django_otp.admin.AdminSite`. i.e. like this:\n\n`urls.py`\n```python\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\n\nfrom django_otp.admin import AdminSite\n\nOTPAdmin.enable()\n\nurlpatterns = [\n url(r'^admin/', admin.site.urls),\n url(r'^qr/', include(\"django_otp.urls\"))\n]\n```\n\n## Other stuff\nFor other stuff that is not documented here, please refer the [source code].\n\n[source code]: https://github.com/hiroaki-yamamoto/django-good-otp\n\n## Contribution\nThe code is on [Github] and you can create issues/PRs. Making issues is\nappreciated, however, **making PRs is more appreciated**.\n\n[Github]: https://github.com/hiroaki-yamamoto/django-good-otp", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hiroaki-yamamoto/django-good-otp", "keywords": "python,OTP,Django", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-good-otp", "package_url": "https://pypi.org/project/django-good-otp/", "platform": "", "project_url": "https://pypi.org/project/django-good-otp/", "project_urls": { "Homepage": "https://github.com/hiroaki-yamamoto/django-good-otp" }, "release_url": "https://pypi.org/project/django-good-otp/1.1.4/", "requires_dist": null, "requires_python": "", "summary": "Yet Another Implementation of One-Time-Password-Authentication for Django", "version": "1.1.4" }, "last_serial": 4692693, "releases": { "1.0.0": [], "1.0.3": [ { "comment_text": "", "digests": { "md5": "abd722e620b73a3922cbfdb36dc2c902", "sha256": "31bd20407376a7f045fd0e45e8203394f7db14e70765e270b85ac89413045604" }, "downloads": -1, "filename": "django_good_otp-1.0.3.tar.gz", "has_sig": false, "md5_digest": "abd722e620b73a3922cbfdb36dc2c902", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9416, "upload_time": "2016-12-29T13:05:43", "url": "https://files.pythonhosted.org/packages/92/bb/6972dd28f80498be3767ccaf42894824097a958c90979d05be92a8735c6d/django_good_otp-1.0.3.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "f75b701d2193c582a295ab043aa2d1d8", "sha256": "b72d6bbf18eebdf7cdecdf2b6d9439f1d5efcf976fadfc671186735852f6d36d" }, "downloads": -1, "filename": "django_good_otp-1.0.5.tar.gz", "has_sig": false, "md5_digest": "f75b701d2193c582a295ab043aa2d1d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12743, "upload_time": "2017-01-05T12:24:50", "url": "https://files.pythonhosted.org/packages/0d/d1/df653d012adf06061ef8f07e017f17b79e841aa50d53f11845f5376a6956/django_good_otp-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "21da5e3f3714ca1db7a75a3cf31a69d2", "sha256": "749e359e63ca7a3045f26d1d6c693817c22d2d7fa02a9073866cd0e109159f96" }, "downloads": -1, "filename": "django_good_otp-1.0.6.tar.gz", "has_sig": false, "md5_digest": "21da5e3f3714ca1db7a75a3cf31a69d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11488, "upload_time": "2017-04-13T10:46:58", "url": "https://files.pythonhosted.org/packages/a2/e6/c705d82ecfcbcf32b5dbf978519c6415ae5cf7329c8288bca6bf3dfef8b1/django_good_otp-1.0.6.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "9e1ff58ac0dc8f0a98843604572fbcbc", "sha256": "96a7b21277f6b7f838cf37a7ed8007dc3c0770426460e9ae7d1f457662cd61d4" }, "downloads": -1, "filename": "django_good_otp-1.1.1.tar.gz", "has_sig": false, "md5_digest": "9e1ff58ac0dc8f0a98843604572fbcbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13071, "upload_time": "2017-12-07T06:28:38", "url": "https://files.pythonhosted.org/packages/5a/8e/b02ba46e4be3872f9d1e17d87d77fe1dbc078fe3e2d614d15ccba2efe6f8/django_good_otp-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "b9a37d554cc06c090466fe676a779ee0", "sha256": "aef8a59f0b97b2fc8d9a04b6b4d988d6b670affd55dc651c16ebe165488028b0" }, "downloads": -1, "filename": "django_good_otp-1.1.2.tar.gz", "has_sig": false, "md5_digest": "b9a37d554cc06c090466fe676a779ee0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13085, "upload_time": "2017-12-09T06:22:51", "url": "https://files.pythonhosted.org/packages/ad/35/f1d5728a918867555c563164d1fb53d7166b0dea1e20505572e3a4dcf951/django_good_otp-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "72d3fdc1adb1a3ed0b8bc120bb727885", "sha256": "f5728058c85aa4437302ef681988dc29500eae68ea24364a409149fa57658f84" }, "downloads": -1, "filename": "django_good_otp-1.1.3.tar.gz", "has_sig": false, "md5_digest": "72d3fdc1adb1a3ed0b8bc120bb727885", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13093, "upload_time": "2018-10-07T09:54:10", "url": "https://files.pythonhosted.org/packages/b8/4a/97b4436989f7416eb488672745d20977bb9b7e3e6bd84c996717c8e3da98/django_good_otp-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "5d6816c1667e878b1f083fa756a8fc8b", "sha256": "34cc9e52c82e48a0a184e6b7ab36b2889a9cbdb95492b89656ce97378344f7cb" }, "downloads": -1, "filename": "django_good_otp-1.1.4.tar.gz", "has_sig": false, "md5_digest": "5d6816c1667e878b1f083fa756a8fc8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10766, "upload_time": "2019-01-14T04:23:31", "url": "https://files.pythonhosted.org/packages/ba/57/f6dd63b749134e89af0d35381e10ca61a3f6d8f4b915248e7a46fad2a485/django_good_otp-1.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5d6816c1667e878b1f083fa756a8fc8b", "sha256": "34cc9e52c82e48a0a184e6b7ab36b2889a9cbdb95492b89656ce97378344f7cb" }, "downloads": -1, "filename": "django_good_otp-1.1.4.tar.gz", "has_sig": false, "md5_digest": "5d6816c1667e878b1f083fa756a8fc8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10766, "upload_time": "2019-01-14T04:23:31", "url": "https://files.pythonhosted.org/packages/ba/57/f6dd63b749134e89af0d35381e10ca61a3f6d8f4b915248e7a46fad2a485/django_good_otp-1.1.4.tar.gz" } ] }