{"id":17269061,"url":"https://github.com/bennylope/django-simple-auth","last_synced_at":"2026-04-30T00:33:57.145Z","repository":{"id":57421937,"uuid":"48305767","full_name":"bennylope/django-simple-auth","owner":"bennylope","description":"Configurable, password-only authorization for *slightly* sensitive material. Not a Django authentication replacement, it's like HTTP basic auth but easier for users (and less secure!)","archived":false,"fork":false,"pushed_at":"2018-01-02T17:33:10.000Z","size":23,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:13:00.895Z","etag":null,"topics":["auth","authentication","django","privacy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bennylope.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-20T03:23:07.000Z","updated_at":"2022-04-29T12:13:13.000Z","dependencies_parsed_at":"2022-09-06T07:10:32.441Z","dependency_job_id":null,"html_url":"https://github.com/bennylope/django-simple-auth","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennylope%2Fdjango-simple-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennylope%2Fdjango-simple-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennylope%2Fdjango-simple-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennylope%2Fdjango-simple-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bennylope","download_url":"https://codeload.github.com/bennylope/django-simple-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245649711,"owners_count":20650097,"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":["auth","authentication","django","privacy","python"],"created_at":"2024-10-15T08:15:14.415Z","updated_at":"2026-04-30T00:33:52.124Z","avatar_url":"https://github.com/bennylope.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================\nDjango Simple Auth\n==================\n\n:Info: Super simple password protection for limiting public access to pages and\n       assets\n:Version: 0.2.1\n:Author: Ben Lopatin (http://benlopatin.com)\n\nDjango Simple Auth is a secondary *authorization* system for protecting any\nURL served by your application from public access. It does not authenticate\nusers and it does not nor cannot replace your user authentication system.\nRather its purpose is to provide a very simple simple password for non-public\ninformation like shared photo galleries.\n\nInstalling\n==========\n\nFirst add the application to your Python path. The easiest way is to use\n`pip`::\n\n    pip install django-simple-auth\n\nAs of version 0.2.0 this is only tested against Django 1.11+ and is probably compatible\nwith Django 1.10 but this has not been tested.\n\nConfiguring\n-----------\n\nMake sure you have `django.contrib.auth` installed, and add the `simple_auth`\napplication to your `INSTALLED_APPS` list::\n\n    INSTALLED_APPS = [\n        ...\n        'django.contrib.auth',\n        'simple_auth',\n    ]\n\nNext add `simple_auth.urls` to your project URLs.::\n\n    ...\n    url(r'^protect/', include('simple_auth.urls')),\n\nIf you want to enable default rule-based limits on your site, install the\n`SimpleAuthMiddleware`::\n\n    MIDDLEWARE = [\n        ...\n        'simple_auth.middleware.SimpleAuthMiddleware',\n    ]\n\nBy default this will require a password for all URLs except for URLs prefaced\nwith `/admin/`. These URLs can be overridden using protect and ignore\nsettings.::\n\n    SIMPLE_AUTH_IGNORE = [\n        r'^admin/,\n        r'^$',\n    ]\n\n    SIMPLE_AUTH_PROTECT = [\n        r'^forums/'\n        r^blog/',\n        r^secret_page.html$',\n    ]\n\nIf a URL is listed in both the ignore and protect lists the default will be to\nprotect the URL and simple_auth will emit a warning.\n\nUsage overview\n==============\n\nThere are two ways to protect pages and assets: view decorators and middleware.\n\nThese methods will always allow authenticated users to access the URL.\n\nMiddleware\n----------\n\nTo enable the middleware install the middleware class as described in the\ninstallation section.\n\nIndividual views\n----------------\n\nNote: not implemented yet.\n\nFor function views::\n\n    from simple_auth import simple_auth_required\n\n    @simple_auth_required\n    def myview(request):\n        ...\n\nFor class-based views::\n\n    from simple_auth import SimpleAuthMixin\n\n    class MyView(SimpleAuthMixin, DetailView):\n        ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennylope%2Fdjango-simple-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbennylope%2Fdjango-simple-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennylope%2Fdjango-simple-auth/lists"}