{"id":13739413,"url":"https://github.com/miguelgrinberg/flask-httpauth","last_synced_at":"2026-04-02T17:01:51.564Z","repository":{"id":8521929,"uuid":"10136908","full_name":"miguelgrinberg/Flask-HTTPAuth","owner":"miguelgrinberg","description":"Simple extension that provides Basic, Digest and Token HTTP authentication for Flask routes","archived":false,"fork":false,"pushed_at":"2026-03-11T19:25:03.000Z","size":283,"stargazers_count":1289,"open_issues_count":10,"forks_count":233,"subscribers_count":19,"default_branch":"main","last_synced_at":"2026-03-26T08:16:49.593Z","etag":null,"topics":["authentication","flask","flask-httpauth","python","security","tokens"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelgrinberg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"miguelgrinberg","patreon":"miguelgrinberg","buy_me_a_coffee":"miguelgrinberg","thanks_dev":"u/gh/miguelgrinberg","custom":"https://paypal.me/miguelgrinberg"}},"created_at":"2013-05-18T05:10:52.000Z","updated_at":"2026-03-19T11:36:02.000Z","dependencies_parsed_at":"2022-09-02T06:22:20.618Z","dependency_job_id":"553b6e23-439e-4881-ac44-e4417a3bb66a","html_url":"https://github.com/miguelgrinberg/Flask-HTTPAuth","commit_stats":{"total_commits":170,"total_committers":35,"mean_commits":4.857142857142857,"dds":0.5941176470588235,"last_synced_commit":"3e8c0d07ca0619aa356b23aad5d5e82aa698d183"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/miguelgrinberg/Flask-HTTPAuth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgrinberg%2FFlask-HTTPAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgrinberg%2FFlask-HTTPAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgrinberg%2FFlask-HTTPAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgrinberg%2FFlask-HTTPAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelgrinberg","download_url":"https://codeload.github.com/miguelgrinberg/Flask-HTTPAuth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgrinberg%2FFlask-HTTPAuth/sbom","scorecard":{"id":644238,"data":{"date":"2025-08-11","repo":{"name":"github.com/miguelgrinberg/Flask-HTTPAuth","commit":"61d5fbad9e8a266fef563b3967ea7765b99ad433"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"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":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/miguelgrinberg/Flask-HTTPAuth/tests.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:17","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:35","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:36","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:46","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:47","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"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":"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":"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":"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":"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 'main'"],"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/miguelgrinberg/.github/SECURITY.md:1","Info: Found linked content: github.com/miguelgrinberg/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/miguelgrinberg/.github/SECURITY.md:1","Info: Found text in security policy: github.com/miguelgrinberg/.github/SECURITY.md:1"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 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-21T11:40:33.233Z","repository_id":8521929,"created_at":"2025-08-21T11:40:33.233Z","updated_at":"2025-08-21T11:40:33.233Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31311012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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":["authentication","flask","flask-httpauth","python","security","tokens"],"created_at":"2024-08-03T04:00:33.720Z","updated_at":"2026-04-02T17:01:51.559Z","avatar_url":"https://github.com/miguelgrinberg.png","language":"Python","funding_links":["https://github.com/sponsors/miguelgrinberg","https://patreon.com/miguelgrinberg","https://buymeacoffee.com/miguelgrinberg","https://thanks.dev/u/gh/miguelgrinberg","https://paypal.me/miguelgrinberg"],"categories":["Web Framework Hardening"],"sub_categories":[],"readme":"Flask-HTTPAuth\n==============\n\n[![Build status](https://github.com/miguelgrinberg/Flask-HTTPAuth/workflows/build/badge.svg)](https://github.com/miguelgrinberg/Flask-HTTPAuth/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/Flask-HTTPAuth/branch/master/graph/badge.svg?token=KeU2002DHo)](https://codecov.io/gh/miguelgrinberg/Flask-HTTPAuth)\n\nSimple extension that provides Basic, Digest and Token HTTP authentication for Flask routes.\n\nInstallation\n------------\nThe easiest way to install this is through pip.\n```\npip install Flask-HTTPAuth\n```\n\nBasic authentication example\n----------------------------\n\n```python\nfrom flask import Flask\nfrom flask_httpauth import HTTPBasicAuth\nfrom werkzeug.security import generate_password_hash, check_password_hash\n\napp = Flask(__name__)\nauth = HTTPBasicAuth()\n\nusers = {\n    \"john\": generate_password_hash(\"hello\"),\n    \"susan\": generate_password_hash(\"bye\")\n}\n\n@auth.verify_password\ndef verify_password(username, password):\n    if username in users and \\\n            check_password_hash(users.get(username), password):\n        return username\n\n@app.route('/')\n@auth.login_required\ndef index():\n    return \"Hello, %s!\" % auth.current_user()\n\nif __name__ == '__main__':\n    app.run()\n```\n\nNote: See the [documentation](https://flask-httpauth.readthedocs.io/) for more complex examples that involve password hashing and custom verification callbacks.\n\nDigest authentication example\n-----------------------------\n\n```python\nfrom flask import Flask\nfrom flask_httpauth import HTTPDigestAuth\n\napp = Flask(__name__)\napp.config['SECRET_KEY'] = 'secret key here'\nauth = HTTPDigestAuth()\n\nusers = {\n    \"john\": \"hello\",\n    \"susan\": \"bye\"\n}\n\n@auth.get_password\ndef get_pw(username):\n    if username in users:\n        return users.get(username)\n    return None\n\n@app.route('/')\n@auth.login_required\ndef index():\n    return \"Hello, %s!\" % auth.username()\n\nif __name__ == '__main__':\n    app.run()\n```\n\nResources\n---------\n\n- [Documentation](http://flask-httpauth.readthedocs.io/en/latest/)\n- [PyPI](https://pypi.org/project/Flask-HTTPAuth)\n- [Change log](https://github.com/miguelgrinberg/Flask-HTTPAuth/blob/main/CHANGES.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelgrinberg%2Fflask-httpauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelgrinberg%2Fflask-httpauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelgrinberg%2Fflask-httpauth/lists"}