{"id":13490971,"url":"https://github.com/gotlium/django-secure-auth","last_synced_at":"2025-05-04T15:33:03.250Z","repository":{"id":12040889,"uuid":"14626392","full_name":"gotlium/django-secure-auth","owner":"gotlium","description":"Secure authentication by TOTP, SMS, Codes \u0026 Question. Login protected by IP ranges and with captcha.","archived":false,"fork":false,"pushed_at":"2022-12-26T20:20:35.000Z","size":648,"stargazers_count":42,"open_issues_count":9,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-08T07:43:03.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gotlium.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-22T18:48:23.000Z","updated_at":"2024-07-27T04:54:31.000Z","dependencies_parsed_at":"2023-01-13T16:46:08.085Z","dependency_job_id":null,"html_url":"https://github.com/gotlium/django-secure-auth","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotlium%2Fdjango-secure-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotlium%2Fdjango-secure-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotlium%2Fdjango-secure-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotlium%2Fdjango-secure-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotlium","download_url":"https://codeload.github.com/gotlium/django-secure-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252356416,"owners_count":21734943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:00:52.517Z","updated_at":"2025-05-04T15:33:02.866Z","avatar_url":"https://github.com/gotlium.png","language":"Python","funding_links":[],"categories":["Security","Libs","Python","安全性"],"sub_categories":["MFA"],"readme":"Django-Secure-Auth\n==================\n\n.. image:: https://landscape.io/github/gotlium/django-secure-auth/master/landscape.svg\n   :target: https://landscape.io/github/gotlium/django-secure-auth/master\n   :alt: Code Health\n.. image:: https://api.codacy.com/project/badge/grade/e1788d6ac7ca437aa6bbb3abfdf19dce\n    :target: https://www.codacy.com/app/gotlium/django-secure-auth\n    :alt: Codacy\n.. image:: https://img.shields.io/badge/python-2.7-blue.svg\n    :alt: Python 2.7, 3.4+\n    :target: https://pypi.python.org/pypi/django-secure-auth/\n.. image:: https://img.shields.io/pypi/v/django-secure-auth.svg\n    :alt: Current version on PyPi\n    :target: https://pypi.python.org/pypi/django-secure-auth/\n.. image:: https://img.shields.io/pypi/dm/django-secure-auth.svg\n    :alt: Downloads from PyPi\n    :target: https://pypi.python.org/pypi/django-secure-auth/\n.. image:: https://img.shields.io/badge/license-GPLv3-green.svg\n    :target: https://pypi.python.org/pypi/django-secure-auth/\n    :alt: License\n\nModule which provide secure authentication by TOTP/SMS/Codes/Question.\nLogin protected by IP ranges and with captcha, when login attempt will fail.\n\n\nDemo installation:\n------------------\n\n.. code-block:: bash\n\n    $ sudo apt-get install -y virtualenvwrapper redis-server git python-dev || brew install pyenv-virtualenvwrapper redis git geoip\n    $ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh || source /usr/local/bin/virtualenvwrapper.sh\n    $ mkvirtualenv django-secure-auth\n    $ workon django-secure-auth\n    $ git clone --depth 1 https://github.com/gotlium/django-secure-auth.git\n    $ cd django-secure-auth\n    $ pip install -r requirements.txt\n    $ python setup.py develop\n    $ cd demo\n    $ pip install -r requirements.txt\n    $ python manage.py syncdb --noinput\n    $ python manage.py migrate --noinput\n    $ python manage.py createsuperuser --username admin --email admin@local.host\n    $ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz\n    $ gunzip GeoLiteCity.dat.gz\n    $ mkdir -p /usr/share/geoip/; mv GeoLiteCity.dat /usr/share/geoip/\n    $ cd ../\n\n\nOpen settings:\n\n.. code-block:: bash\n\n    $ vim demo/settings.py\n\n\nReplace Twilio credentials in ``AUTH_SMS_BACKEND_AUTH`` to your demo account settings or change SMS_FORCE to False.\n\nRun Redis server and Celery daemon(or remove 'djcelery' from ``INSTALLED_APPS``):\n\n.. code-block:: bash\n\n    $ make run_redis\n    $ make run_celery\n\n\nRun test server:\n\n.. code-block:: bash\n\n    $ make run_server\n\n\nNow you can open https://127.0.0.1:8000/accounts/register/ and register\nnew account and setup all available authentication methods.\n\n*Note: activation link will be output to console.*\n\n\nCrontab\n-------\n\nWhen you are using TOTP auth method, please update your server time.\nIf your server time is behind from real time, user cannot be authenticated by authenticator app.\nYou can run ntpd clients, or update time on server by cron job:\n\n.. code-block:: bash\n\n    SHELL=/bin/bash\n    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\n    MAILTO=root@localhost\n\n    # Update time\n    0 */6 * * * ntpdate ntp.ubuntu.com \u003e\u0026 /dev/null\n\n\nScreenshots\n-----------\n.. image:: /screenshots/login-confirmation.jpg\n.. image:: /screenshots/settings.jpg\n.. image:: /screenshots/two-factor-configuration.jpg\n.. image:: /screenshots/sms-settings.jpg\n\n\nCompatibility\n-------------\n* Python: 2.7\n* Django: 1.4, 1.8\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotlium%2Fdjango-secure-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotlium%2Fdjango-secure-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotlium%2Fdjango-secure-auth/lists"}