{"id":30883258,"url":"https://github.com/globocom/aio-alf","last_synced_at":"2025-09-08T09:43:52.610Z","repository":{"id":57408743,"uuid":"112772357","full_name":"globocom/aio-alf","owner":"globocom","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-25T14:24:58.000Z","size":30,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-17T11:52:50.164Z","etag":null,"topics":["aiohttp","asyncio","oauth2-server","python","python36"],"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/globocom.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":"2017-12-01T18:18:25.000Z","updated_at":"2019-10-21T02:03:14.000Z","dependencies_parsed_at":"2022-09-26T17:10:57.151Z","dependency_job_id":null,"html_url":"https://github.com/globocom/aio-alf","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/aio-alf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Faio-alf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Faio-alf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Faio-alf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Faio-alf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/aio-alf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Faio-alf/sbom","scorecard":{"id":430028,"data":{"date":"2025-08-11","repo":{"name":"github.com/globocom/aio-alf","commit":"70d13fa68d52ffd8cc2dcb70329eccefba6a1d88"},"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":"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":"Code-Review","score":0,"reason":"Found 1/28 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":"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":"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":"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":"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":"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"}},{"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-19T03:07:14.647Z","repository_id":57408743,"created_at":"2025-08-19T03:07:14.647Z","updated_at":"2025-08-19T03:07:14.647Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166933,"owners_count":25233959,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aiohttp","asyncio","oauth2-server","python","python36"],"created_at":"2025-09-08T09:43:50.664Z","updated_at":"2025-09-08T09:43:52.587Z","avatar_url":"https://github.com/globocom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"aio-alf |build-status|\n===========\n\naiohttp OAuth 2 Client\n---------------------\n\n`aio-alf` is a OAuth 2 Client base on the aiohttp's AsyncHTTPClient\n\nFeatures\n--------\n\n* Automatic token retrieving and renewing\n* Token expiration control\n* Automatic retry on status 401 (UNAUTHORIZED)\n\nUsage\n-----\n\nInitialize the client and use it as a AsyncHTTPClient object.\n\n.. code-block:: python\n\n    from aioalf.client import Client\n    from aioalf.httpclient import HTTPRequest\n\n    client = Client(\n        token_endpoint='http://example.com/token',\n        client_id='client-id',\n        client_secret='secret')\n\n    resource_uri = 'http://example.com/resource'\n\n    response = await client.request(\n        'POST',\n        resource_uri,\n        data='{\"name\": \"alf\"}',\n        headers={'Content-Type': 'application/json'}\n    )\n\n\nAlternatively one can pass directly a string to the fetch client\n\n.. code-block:: python\n\n    # ...\n    response = await client.request(\n        'POST',\n        'http://example.com/resource',\n        data='{\"name\": \"alf\"}',\n        headers={'Content-Type': 'application/json'}\n    )\n\nImplicit Flow\n-------------\n\nSupport for OAuth2 implict flow to enable it, call `use_implicit_flow` with a `TokenStorage`\nobject and a port range, it defaults to the range (32000, 32009).\n\nExample:\n\n.. code-block:: python\n\n    await use_implicit_flow(TokenStorage(), (30000, 30009))\n\n    async with Client(token_endpoint='https://token.endpoint',\n                      client_id='glBQ3nYU/8/kaVi/bIgXGA==',\n                      client_secret='') as client:\n        response = await client.request('GET', 'http://example.com/resource')\n        text = await response.text()\n        print(response.status)\n\nThe library has a really simple in memory token storage, you should subclass and overwrite\nits methods if you need to persist the token for a longer period.\n\n\nHow it works?\n-------------\n\nBefore any request the client tries to retrieve a token on the endpoint,\nexpecting a JSON response with the ``access_token`` and ``expires_in`` keys.\n\nThe client keeps the token until it is expired, according to the ``expires_in``\nvalue.\n\nAfter getting the token, the request is issued with a `Bearer authorization\nheader \u003chttp://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-7.1\u003e`_:\n\n.. code-block::\n\n    GET /resource/1 HTTP/1.1\n    Host: example.com\n    Authorization: Bearer token\n\nIf the request fails with a 401 (UNAUTHORIZED) status, a new token is retrieved\nfrom the endpoint and the request is retried. This happens only once, if it\nfails again the error response is returned.\n\n\nTroubleshooting\n---------------\n\nIn case of an error retrieving a token, the error response will be returned,\nthe real request won't happen.\n\n\nRelated projects\n----------------\n\nThis project tries to be an adaptation to aiohttp of\n`alf \u003chttps://github.com/globocom/alf\u003e`_\n\n\n.. |build-status| image:: https://secure.travis-ci.org/globocom/aio-alf.png?branch=master\n                  :target: https://travis-ci.org/globocom/aio-alf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Faio-alf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Faio-alf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Faio-alf/lists"}