{"id":37065539,"url":"https://github.com/druids/django-class-based-auth-views","last_synced_at":"2026-01-14T07:40:25.381Z","repository":{"id":57419303,"uuid":"44545218","full_name":"druids/django-class-based-auth-views","owner":"druids","description":null,"archived":false,"fork":true,"pushed_at":"2018-06-08T11:07:18.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-01-01T15:29:48.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"stefanfoulis/django-class-based-auth-views","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/druids.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":"2015-10-19T15:41:15.000Z","updated_at":"2016-02-07T10:03:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/druids/django-class-based-auth-views","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/druids/django-class-based-auth-views","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fdjango-class-based-auth-views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fdjango-class-based-auth-views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fdjango-class-based-auth-views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fdjango-class-based-auth-views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druids","download_url":"https://codeload.github.com/druids/django-class-based-auth-views/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fdjango-class-based-auth-views/sbom","scorecard":{"id":357114,"data":{"date":"2025-08-11","repo":{"name":"github.com/druids/django-class-based-auth-views","commit":"43b8229aa68bfa43cf2d7d27658c4fda1988b414"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 1/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T09:53:19.115Z","repository_id":57419303,"created_at":"2025-08-18T09:53:19.115Z","updated_at":"2025-08-18T09:53:19.115Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-14T07:40:24.677Z","updated_at":"2026-01-14T07:40:25.368Z","avatar_url":"https://github.com/druids.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=============================\ndjango-class-based-auth-views\n=============================\n\nrelated packages\n================\n\n* `django-password-reset \u003chttps://github.com/brutasse/django-password-reset\u003e`_ has class based views to reset\n  forgotten passwords by email confirmation.\n\n\nA reimplementation of ``django.contrib.auth.views`` as class based views. Hopefully at some point this project or\nsomething similar will make it into django proper.\n\nCurrently ``LoginView`` and ``LogoutView`` are implemented.\n\n\nInstallation\n============\n\n::\n\n    pip install django-class-based-auth-views\n\n\nBasic usage\n===========\n\nInstead of including ``django.contrib.auth.login`` into your ``urls.py``, just use the one provided by this project.\n``urls.py``::\n\n    from class_based_auth_views.views import LoginView, LogoutView\n    urlpatterns = patterns('',\n        url(r'^login/$', LoginView.as_view(form_class=EmailAsUsernameAuthenticationForm), name=\"login\"),\n        url(r'^logout/$', LogoutView.as_view(), name=\"logout\"),\n    )\n\n\nBe aware that the logout view requires a ``POST`` to actually logout. So the ``registration/logout.html`` template\nshould contain a form with a submit button.\n\n\nExtending LoginView Example\n===========================\n\nNow that LoginView is based on generic class based views it is much easier to extend. Say you need to implement a\n2 step login procedure with a one time password::\n\n\n    from django.contrib.auth import login\n\n    class PhaseOneLoginView(LoginView):\n        def form_valid(self, form):\n            \"\"\"\n            Forces superusers to login in a 2 step process (One Time Password). Other users are logged in normally\n            \"\"\"\n            user = form.get_user()\n            if user.is_superuser:\n                self.save_user(user)\n                return HttpResponseRedirect(self.get_phase_two_url())\n            else:\n                login(self.request, user)\n                return HttpResponseRedirect(self.get_success_url())\n\n        def get_phase_two_url(self):\n            return reverse('phase_two_login')\n\n        def save_user(self, user):\n            self.request.session['otp_user'] = user\n\n\n    class PhaseTwoLoginView(FormView):\n        form_class = OTPTokenForm\n\n        def get_user(self):\n            return self.request.session.get('otp_user', None)\n\n        def clean_user(self):\n            if 'otp_user' in self.request.session:\n                del self.request.session['otp_user']\n\n        def form_valid(self, form):\n            code = form.cleaned_data.get('code')\n            user = self.get_user()\n            login(request, user)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fdjango-class-based-auth-views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruids%2Fdjango-class-based-auth-views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fdjango-class-based-auth-views/lists"}