{"id":31024944,"url":"https://github.com/aminebizid/simple_oauth2","last_synced_at":"2026-04-16T00:32:39.066Z","repository":{"id":34904300,"uuid":"188603768","full_name":"aminebizid/simple_oauth2","owner":"aminebizid","description":"Simple OAuth2 library for Python","archived":false,"fork":false,"pushed_at":"2022-05-25T02:05:47.000Z","size":12,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T21:52:40.973Z","etag":null,"topics":["authentication","authorization","azuread","client-credentials","flask","implicit-flow","oauth2","okta","python3"],"latest_commit_sha":null,"homepage":null,"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/aminebizid.png","metadata":{"files":{"readme":"README.md","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":"2019-05-25T19:16:14.000Z","updated_at":"2019-05-26T20:11:32.000Z","dependencies_parsed_at":"2022-09-03T23:22:51.666Z","dependency_job_id":null,"html_url":"https://github.com/aminebizid/simple_oauth2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aminebizid/simple_oauth2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminebizid%2Fsimple_oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminebizid%2Fsimple_oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminebizid%2Fsimple_oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminebizid%2Fsimple_oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aminebizid","download_url":"https://codeload.github.com/aminebizid/simple_oauth2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminebizid%2Fsimple_oauth2/sbom","scorecard":{"id":189460,"data":{"date":"2025-08-11","repo":{"name":"github.com/aminebizid/simple_oauth2","commit":"175c31bfd1c527ae3fb7452bed047f4c70c6e918"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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 'master'"],"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"}}]},"last_synced_at":"2025-08-16T20:21:35.790Z","repository_id":34904300,"created_at":"2025-08-16T20:21:35.790Z","updated_at":"2025-08-16T20:21:35.790Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: 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","authorization","azuread","client-credentials","flask","implicit-flow","oauth2","okta","python3"],"created_at":"2025-09-13T16:16:15.270Z","updated_at":"2026-04-16T00:32:38.891Z","avatar_url":"https://github.com/aminebizid.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oauth2 library for python flask and restplus\n\nWith this simple library, you can authenticate clients coming from a browser (Implicit Flow) or using Bearer token (Credential flow).\nYou can manage authorization using rbac function as described here after.\n\n## Requirements\n\nInstall these requirements\n\n```text\ncryptography\nPyJWT==1.7.1\nflask-restplus\nsimple-oauth2\n```\n\n## Usage example\n\n```python\nimport os\nfrom flask import Flask\nfrom flask_restplus import Api, Resource\nfrom simple_oauth2 import OAuth\n\n\napi = Api()\napp = Flask(__name__)\napp.secret_key = os.urandom(32)\napi.init_app(app)\n\noauth_config = {\n    'well_known_url': '{well_known_url}',\n    'client_id': '{client_id}',\n    'redirect_uri': '{host:port}/signin-oidc',\n    'audience': '{audience}',\n    'scopes': '{space separated scopes}',\n    'whitelist': ['/openbar?']\n}\n\ndef rbac(client, operation):\n    print('client ', client, ' is asking for operation ', operation)\n    return True\n\noauth = OAuth(app, oauth_config, rbac=rbac)\n\n# flask\n@app.route('/')\ndef slah():\n    return 'Hello'\n\n\n@app.route('/hello')\n@oauth.authorize('hello')\ndef hello():\n    return 'hi'\n\n\n@app.route('/openbar')\ndef openbar():\n    return 'Chimay'\n\n\n# restplus\n@api.route('/toto')\nclass Toto(Resource):\n    @oauth.authorize('toto')\n    def get(self):\n        return {'hello': 'world'}\n\n\nif __name__ == \"__main__\":\n    app.run(host='0.0.0.0', debug=True)\n\n```\n\n## Contributors\n\nRegister [here](https://test.pypi.org/account/register/ )\n\nInstall required packages\n\n```bash\npython -m pip install --user --upgrade setuptools wheel\npython -m pip install --user --upgrade twine\n```\n\nPackage like this:\n\n```bash\npython setup.py sdist bdist_wheel\npython -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```\n\nTest install\n\n```bash\npip install -i https://test.pypi.org/simple/ simple-oauth2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminebizid%2Fsimple_oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faminebizid%2Fsimple_oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminebizid%2Fsimple_oauth2/lists"}