{"id":28423906,"url":"https://github.com/copiousfreetime/htauth","last_synced_at":"2025-09-11T01:35:46.963Z","repository":{"id":408443,"uuid":"27417","full_name":"copiousfreetime/htauth","owner":"copiousfreetime","description":"HTAuth is a pure ruby replacement for the Apache support programs 'htdigest' and 'htpasswd'","archived":false,"fork":false,"pushed_at":"2024-03-04T04:46:22.000Z","size":311,"stargazers_count":12,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-27T21:56:49.277Z","etag":null,"topics":["apache2","authentication","htdigest","ruby"],"latest_commit_sha":null,"homepage":"https://github.com/copiousfreetime/htauth/","language":"Ruby","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/copiousfreetime.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","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":"2008-06-22T04:16:35.000Z","updated_at":"2025-07-21T17:02:27.000Z","dependencies_parsed_at":"2024-03-04T05:48:12.472Z","dependency_job_id":null,"html_url":"https://github.com/copiousfreetime/htauth","commit_stats":{"total_commits":169,"total_committers":5,"mean_commits":33.8,"dds":0.2603550295857988,"last_synced_commit":"acd26a0f56340c271f1492a6ba579d86d6506006"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/copiousfreetime/htauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Fhtauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Fhtauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Fhtauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Fhtauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/copiousfreetime","download_url":"https://codeload.github.com/copiousfreetime/htauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Fhtauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271394822,"owners_count":24751996,"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-08-20T02:00:09.606Z","response_time":69,"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":["apache2","authentication","htdigest","ruby"],"created_at":"2025-06-05T09:09:44.505Z","updated_at":"2025-08-20T22:18:35.886Z","avatar_url":"https://github.com/copiousfreetime.png","language":"Ruby","readme":"## HTAuth\n\n[![Build Status](https://copiousfreetime.semaphoreci.com/badges/htauth/branches/main.svg)](https://copiousfreetime.semaphoreci.com/projects/htauth)\n\n* [Homepage](http://github.com/copiousfreetime/htauth)\n* [Github](http://github.com/copiousfreetime/htauth)\n\n## DESCRIPTION\n\nHTAuth provides an API and commandline tools for managing Apache/httpd style\nhtpasswd and htdigest files.\n\n## FEATURES\n\nHTAuth provides an API allowing direct manipulation of Apache/httpd style\n`htdigest` and `htpasswd` files. Supporting full programmatic manipulation and\nauthentication of user credentials.\n\nHTAuth also includes drop-in, commandline compatible replacements for the Apache\nutilities `htpasswd` and `htdigest` with the respective `htpasswd-ruby` and\n`htdigest-ruby` commands.\n\nAdditionally, support for the [argon2](https://github.com/technion/ruby-argon2)\npassword hashing algorithm is provided for most platforms.\n\n## SYNOPSIS\n\n### API Usage\n\n    HTAuth::DigestFile.open(\"some.htdigest\") do |df|\n      df.add_or_update('someuser', 'myrealm', 'a password')\n      df.delete('someolduser', 'myotherrealm')\n    end\n\n    HTAuth::PasswdFile.open(\"some.htpasswd\", HTAuth::File::CREATE) do |pf|\n      pf.add('someuser', 'a password', 'md5')\n      pf.add('someotheruser', 'a different password', 'sha1')\n    end\n\n    HTAuth::PasswdFile.open(\"some.htpasswd\", HTAuth::File::ALTER) do |pf|\n      pf.update('someuser', 'a password', 'bcrypt')\n    end\n\n    HTAuth::PasswdFile.open(\"some.htpasswd\") do |pf|\n      pf.authenticated?('someuser', 'a password')\n    end\n\n\n### htpasswd-ruby command line application\n\n    Usage:\n            htpasswd-ruby [-cimBdpsD] [-C cost] passwordfile username\n            htpasswd-ruby -b[cmBdpsD] [-C cost] passwordfile username password\n\n            htpasswd-ruby -n[imBdps] [-C cost] username\n            htpasswd-ruby -nb[mBdps] [-C cost] username password\n\n            --argon2     Force argon2 encryption of the password.\n        -b, --batch      Batch mode, get the password from the command line, rather than prompt.\n        -B, --bcrypt     Force bcrypt encryption of the password.\n        -C, --cost COST  Set the computing time used for the bcrypt algorithm\n                         (higher is more secure but slower, default: 5, valid: 4 to 31).\n        -c, --create     Create a new file; this overwrites an existing file.\n        -d, --crypt      Force CRYPT encryption of the password.\n        -D, --delete     Delete the specified user.\n        -h, --help       Display this help.\n        -i, --stdin      Read the passwod from stdin without verivication (for script usage).\n        -m, --md5        Force MD5 encryption of the password (default).\n        -n, --stdout     Do not update the file; Display the results on stdout instead.\n        -p, --plaintext  Do not encrypt the password (plaintext).\n        -s, --sha1       Force SHA encryption of the password.\n        -v, --version    Show version info.\n            --verify     Verify password for the specified user.\n\n### htdigest-ruby command line application\n\n    Usage: htdigest-ruby [options] passwordfile realm username\n        -c, --create   Create a new digest password file; this overwrites an existing file.\n        -D, --delete   Delete the specified user.\n        -h, --help     Display this help.\n        -v, --version  Show version info.\n\n## Supported Hash Algorithms\n\nOut of the box, `htauth` supports the classic algorithms that ship with Apache\n`htpasswd`.\n\n- Built in\n    - Generally accepted\n        - MD5 (default for compatibility reasons)\n        - bcrypt (probably the better choice)\n\n    - **Not Recommended** - available only for backwards compatibility with `htpasswd`\n        - SHA1\n        - crypt\n        - plaintext\n\n- Available with the installation of additional libraries:\n    - argon2 - to use, add `gem 'argon2'` to your `Gemfile`. `argon2` will\n      now be a valid algorithm to use in `HTAuth::PasswdFile` API. Currently\n      argon2 is not supported on windows as the upstream `argon2` gem does not\n      support windows.\n\n## CREDITS\n\n* [The Apache Software Foundation](http://www.apache.org/)\n* all the folks who contributed to htdigest and htpasswd\n\n## MIT LICENSE\n\nCopyright (c) 2008 Jeremy Hinegardner\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopiousfreetime%2Fhtauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopiousfreetime%2Fhtauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopiousfreetime%2Fhtauth/lists"}