{"id":32297215,"url":"https://github.com/ptrbrynt/frog_auth","last_synced_at":"2026-02-22T00:01:58.102Z","repository":{"id":61975434,"uuid":"525822956","full_name":"ptrbrynt/frog_auth","owner":"ptrbrynt","description":"Authentication for Dart Frog apps","archived":false,"fork":false,"pushed_at":"2022-11-04T21:56:01.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-23T04:39:45.162Z","etag":null,"topics":["authentication","dart","dart-frog"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/ptrbrynt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-08-17T14:14:11.000Z","updated_at":"2025-03-05T15:59:22.000Z","dependencies_parsed_at":"2023-01-21T22:45:40.424Z","dependency_job_id":null,"html_url":"https://github.com/ptrbrynt/frog_auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ptrbrynt/frog_auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrbrynt%2Ffrog_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrbrynt%2Ffrog_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrbrynt%2Ffrog_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrbrynt%2Ffrog_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptrbrynt","download_url":"https://codeload.github.com/ptrbrynt/frog_auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrbrynt%2Ffrog_auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29699335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"ssl_error","status_checked_at":"2026-02-21T23:35:03.832Z","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":["authentication","dart","dart-frog"],"created_at":"2025-10-23T04:39:31.857Z","updated_at":"2026-02-22T00:01:58.095Z","avatar_url":"https://github.com/ptrbrynt.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frog Auth\n\nAuthentication tools for [Dart Frog](http://dartfrog.vgv.dev) apps.\n\n## Installation\n\n![Pub Version](https://img.shields.io/pub/v/frog_auth)\n\n```sh\ndart pub add frog_auth\n```\n\n## Usage\n\n### Basic Authentication\n\nTo support [Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication), simply add the `basicAuthentication` middleware:\n\n```dart\nHandler middleware(Handler handler) {\n    return handler.use(\n        basicAuthentication(\n            retrieveUser: (context, username, password) async {\n                // TODO Retrieve user by username/password\n            },\n        ),\n    );\n}\n```\n\nThe `retrieveUser` callback should be used to lookup the user using the given username and password. If no user is found with the given credentials, you should return `null`.\n\nIf a non-null user is returned by the `retrieveUser` callback, it will be provided to the current request context and can be retrieved using `context.read()`.\n\n`retrieveUser` can return an object of any type extending `Object`, so should be flexible enough to work with any database system.\n\n### Bearer Authentication\n\nTo support [Bearer authentication](https://datatracker.ietf.org/doc/html/rfc6750), simply add the `bearerAuthentication` middleware:\n\n```dart\nHandler middleware(Handler handler) {\n    return handler.use(\n        bearerAuthentication(\n            retrieveUser: (context, token) async {\n                // TODO Retrieve user by token\n            },\n        ),\n    );\n}\n```\n\nThe `retrieveUser` callback should be used to lookup the user using the given token. If no user is found with the given token, you should return `null`.\n\nIf a non-null user is returned by the `retrieveUser` callback, it will be provided to the current request context and can be retrieved using `context.read()`.\n\n`retrieveUser` can return an object of any type extending `Object`, so should be flexible enough to work with any database system.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptrbrynt%2Ffrog_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptrbrynt%2Ffrog_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptrbrynt%2Ffrog_auth/lists"}