{"id":15957072,"url":"https://github.com/mamantoha/http-client-digest_auth","last_synced_at":"2025-08-23T03:03:39.657Z","repository":{"id":55069924,"uuid":"206947492","full_name":"mamantoha/http-client-digest_auth","owner":"mamantoha","description":"An implementation of RFC 2617 Digest Access Authentication for Crystal","archived":false,"fork":false,"pushed_at":"2023-08-21T08:44:14.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T20:16:25.952Z","etag":null,"topics":["crystal","digest-authentication","http-client"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/mamantoha.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-07T09:43:46.000Z","updated_at":"2022-10-03T13:01:02.000Z","dependencies_parsed_at":"2024-10-07T13:40:32.150Z","dependency_job_id":null,"html_url":"https://github.com/mamantoha/http-client-digest_auth","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp-client-digest_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp-client-digest_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp-client-digest_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp-client-digest_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/http-client-digest_auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247152374,"owners_count":20892478,"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":["crystal","digest-authentication","http-client"],"created_at":"2024-10-07T13:40:29.060Z","updated_at":"2025-04-04T09:29:41.552Z","avatar_url":"https://github.com/mamantoha.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP::Client::DigestAuth\n\n![Crystal CI](https://github.com/mamantoha/http-client-digest_auth/workflows/Crystal%20CI/badge.svg)\n[![GitHub release](https://img.shields.io/github/release/mamantoha/http-client-digest_auth.svg)](https://github.com/mamantoha/http-client-digest_auth/releases)\n[![License](https://img.shields.io/github/license/mamantoha/http-client-digest_auth.svg)](https://github.com/mamantoha/http-client-digest_auth/blob/master/LICENSE)\n\nAn implementation of RFC 2617 - Digest Access Authentication. At this time\nthis library does not drop in to `HTTP::Client` and can be used for with other HTTP\nclients.\n\n[crest](https://github.com/mamantoha/crest) uses this shard to provide _Digest Access Authentication_ support out of the box.\n\nIn order to use `http-client-digest_auth` you'll need to perform some request\nwrangling on your own. See the class documentation at `HTTP::Client::DigestAuth`\nfor an example.\n\nPorted from Ruby's [net-http-digest_auth](https://github.com/drbrain/net-http-digest_auth) gem.\n\n## Installation\n\nAdd this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  http-client-digest_auth:\n    github: mamantoha/http-client-digest_auth\n```\n\n## Usage\n\n```crystal\nrequire \"http/client\"\nrequire \"uri\"\nrequire \"http-client-digest_auth\"\n\nurl = \"https://httpbin.org/digest-auth/auth/admin/passwd/MD5\"\n\nuri = URI.parse(url)\nuri.user = \"admin\"\nuri.password = \"passwd\"\n\nclient = HTTP::Client.new(uri)\n\nresponse = client.get(uri.full_path)\n# response is a 401 response with a WWW-Authenticate header\n\nwww_authenticate = response.headers[\"WWW-Authenticate\"]\n\ndigest_auth = HTTP::Client::DigestAuth.new\nauth = digest_auth.auth_header(uri, www_authenticate, \"GET\")\n\nhttp_headers = HTTP::Headers.new\nhttp_headers[\"Authorization\"] = auth\n\n# re-issue request with Authorization\nresponse = client.get(uri.full_path, http_headers)\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/http-client-digest_auth/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Anton Maminov](https://github.com/mamantoha) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fhttp-client-digest_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fhttp-client-digest_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fhttp-client-digest_auth/lists"}