{"id":15697556,"url":"https://github.com/kt3k/basic_auth","last_synced_at":"2025-05-09T01:17:27.890Z","repository":{"id":38374451,"uuid":"371610349","full_name":"kt3k/basic_auth","owner":"kt3k","description":"Module for performing Basic Auth in Deno Deploy","archived":false,"fork":false,"pushed_at":"2022-08-30T05:26:45.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T01:17:22.174Z","etag":null,"topics":["deno","deno-deploy"],"latest_commit_sha":null,"homepage":"https://deno.land/x/basic_auth","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kt3k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-28T07:00:12.000Z","updated_at":"2023-12-18T06:02:26.000Z","dependencies_parsed_at":"2022-08-25T01:41:04.754Z","dependency_job_id":null,"html_url":"https://github.com/kt3k/basic_auth","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fbasic_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fbasic_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fbasic_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fbasic_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/basic_auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171289,"owners_count":21865299,"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","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":["deno","deno-deploy"],"created_at":"2024-10-03T19:20:33.630Z","updated_at":"2025-05-09T01:17:27.855Z","avatar_url":"https://github.com/kt3k.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# basic_auth v1.1.1\n\nModule for performing Basic Auth in Deno Deploy.\n\n[Demo](https://basic-auth-demo.deno.dev/)\n\n# Usage\n\nimport `basicAuth` function from the module url and use it like the below:\n\n```ts\nimport { basicAuth } from \"https://deno.land/x/basic_auth@v1.1.1/mod.ts\";\n\naddEventListener(\"fetch\", (e) =\u003e {\n  const unauthorized = basicAuth(e.request, \"Access to my site\", {\n    \"user\": \"password\",\n  });\n  if (unauthorized) {\n    e.respondWith(unauthorized);\n    return;\n  }\n  e.respondWith(new Response(\"You are authorized!\"));\n});\n```\n\nReplace `user` and `password` part with your credentials. You can also set\nmultiple credentials by setting multiple key value pairs in the 3rd parameter.\n\n# [API doc](https://doc.deno.land/https/deno.land/x/basic_auth/mod.ts)\n\n# LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fbasic_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Fbasic_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fbasic_auth/lists"}