{"id":16554661,"url":"https://github.com/owez/rocket-basicauth","last_synced_at":"2025-07-13T19:40:43.104Z","repository":{"id":47246956,"uuid":"317941683","full_name":"Owez/rocket-basicauth","owner":"Owez","description":"A high-level basic access authentication request guard for Rocket.rs","archived":false,"fork":false,"pushed_at":"2024-01-03T21:00:04.000Z","size":16,"stargazers_count":7,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T00:38:15.210Z","etag":null,"topics":["auth","authentication","basic-auth","rocket","web"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rocket-basicauth","language":"Rust","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/Owez.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":"2020-12-02T17:36:31.000Z","updated_at":"2024-10-16T06:11:34.000Z","dependencies_parsed_at":"2024-10-29T07:45:38.425Z","dependency_job_id":null,"html_url":"https://github.com/Owez/rocket-basicauth","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.2666666666666667,"last_synced_commit":"2ba648af24343943dbf71c7470b80e5d96c6acf3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owez%2Frocket-basicauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owez%2Frocket-basicauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owez%2Frocket-basicauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owez%2Frocket-basicauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Owez","download_url":"https://codeload.github.com/Owez/rocket-basicauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244778024,"owners_count":20508837,"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":["auth","authentication","basic-auth","rocket","web"],"created_at":"2024-10-11T19:52:04.837Z","updated_at":"2025-03-21T10:32:20.082Z","avatar_url":"https://github.com/Owez.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rocket-basicauth\n\n[![Tests](https://github.com/Owez/rocket-basicauth/workflows/Tests/badge.svg)](https://github.com/Owez/rocket-basicauth/actions?query=workflow%3ATests) [![Docs](https://docs.rs/rocket-basicauth/badge.svg)](https://docs.rs/rocket-basicauth/)\n\nA high-level [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) request guard for [Rocket.rs](https://rocket.rs)\n\n## Example\n\n```rust\n#[macro_use] extern crate rocket;\n\nuse rocket_basicauth::BasicAuth;\n\n/// Hello route with `auth` request guard, containing a `name` and `password`\n#[get(\"/hello/\u003cage\u003e\")]\nfn hello(auth: BasicAuth, age: u8) -\u003e String {\n    format!(\"Hello, {} year old named {}!\", age, auth.username)\n}\n\n#[launch]\nfn rocket() -\u003e _ {\n    rocket::build().mount(\"/\", routes![hello])\n}\n```\n\n## Installation\n\nSimply add the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nrocket-basicauth = \"3\"\n```\n\n#### Disabling logging\n\nBy default, this crate uses the [`log`](https://crates.io/crates/log) library to automatically add minimal trace-level logging, to disable this, instead write:\n\n```toml\n[dependencies]\nrocket-basicauth = { version = \"2\", default-features = false }\n```\n\n#### Rocket 0.5-rc1 to 0.5-rc3\n\nVersion 2.0 supports the pre-release versions of Rocket 0.5 RC1 to RC3\n\n```toml\n[dependencies]\nrocket-basicauth = \"2\"\n```\n\n#### Rocket 0.4\n\nSupport for Rocket 0.4 is **decrepit** in the eyes of this crate but may still be used by changing the version, to do this, instead write:\n\n```toml\n[dependencies]\nrocket-basicauth = \"1\"\n```\n\n## Security\n\nSome essential security considerations to take into account are the following:\n\n- This crate has not been audited by any security professionals. If you are willing to do or have already done an audit on this crate, please create an issue as it would help out enormously! 😊\n- This crate purposefully does not limit the maximum length of http basic auth headers arriving so please ensure your webserver configurations are set properly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowez%2Frocket-basicauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowez%2Frocket-basicauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowez%2Frocket-basicauth/lists"}