{"id":15523322,"url":"https://github.com/maxcountryman/axum-login","last_synced_at":"2025-05-14T02:04:57.979Z","repository":{"id":58012817,"uuid":"529648940","full_name":"maxcountryman/axum-login","owner":"maxcountryman","description":"🪪 User identification, authentication, and authorization for Axum.","archived":false,"fork":false,"pushed_at":"2025-03-15T23:32:25.000Z","size":257,"stargazers_count":783,"open_issues_count":5,"forks_count":80,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-11T17:46:24.634Z","etag":null,"topics":["access-control","authentication","authorization","axum","login"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"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/maxcountryman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["maxcountryman"]}},"created_at":"2022-08-27T17:13:06.000Z","updated_at":"2025-05-11T13:47:20.000Z","dependencies_parsed_at":"2023-10-15T03:10:11.892Z","dependency_job_id":"e796abdb-cc07-49ae-9516-ad54f22ac2ab","html_url":"https://github.com/maxcountryman/axum-login","commit_stats":{"total_commits":171,"total_committers":17,"mean_commits":"10.058823529411764","dds":0.216374269005848,"last_synced_commit":"9c26b37cd03be8d803ae261b7bc556229c2043da"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Faxum-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Faxum-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Faxum-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Faxum-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxcountryman","download_url":"https://codeload.github.com/maxcountryman/axum-login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052692,"owners_count":22006716,"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":["access-control","authentication","authorization","axum","login"],"created_at":"2024-10-02T10:44:43.882Z","updated_at":"2025-05-14T02:04:57.935Z","avatar_url":"https://github.com/maxcountryman.png","language":"Rust","funding_links":["https://github.com/sponsors/maxcountryman"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    axum-login\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    🪪 User identification, authentication, and authorization for Axum.\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://crates.io/crates/axum-login\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/axum-login.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://docs.rs/axum-login\"\u003e\n        \u003cimg src=\"https://docs.rs/axum-login/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/maxcountryman/axum-login/actions/workflows/rust.yml\"\u003e\n        \u003cimg src=\"https://github.com/maxcountryman/axum-login/actions/workflows/rust.yml/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/maxcountryman/axum-login\" \u003e \n        \u003cimg src=\"https://codecov.io/gh/maxcountryman/axum-login/graph/badge.svg?token=4WKTLPEGJC\"/\u003e \n    \u003c/a\u003e\n\u003c/div\u003e\n\n## 🎨 Overview\n\nThis crate provides user identification, authentication, and authorization\nas a `tower` middleware for `axum`.\n\nIt offers:\n\n- **User Identification, Authentication, and Authorization**: Leverage\n  `AuthSession` to easily manage authentication and authorization. This is\n  also an extractor, so it can be used directly in your `axum` handlers.\n- **Support for Arbitrary Users and Backends**: Applications implement a\n  couple of traits, `AuthUser` and `AuthnBackend`, allowing for any user\n  type and any user management backend. Your database? Yep. LDAP? Sure. An\n  auth provider? You bet.\n- **User and Group Permissions**: Authorization is supported via the\n  `AuthzBackend` trait, which allows applications to define custom\n  permissions. Both user and group permissions are supported.\n- **Convenient Route Protection**: Middleware for protecting access to\n  routes are provided via the `login_required` and `permission_required`\n  macros. Or bring your own by using `AuthSession` directly with\n  `from_fn`.\n- **Rock-solid Session Management**: Uses [`tower-sessions`](https://github.com/maxcountryman/tower-sessions)\n  for high-performing and ergonomic session management. _Look ma, no deadlocks!_\n\n## 📦 Install\n\nTo use the crate in your project, add the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\naxum-login = \"0.17.0\"\n```\n\n## 🤸 Usage\n\nWe recommend reviewing our [`sqlite` example][sqlite-example]. There is also a [template for `cargo-generate` using postgres](https://gitlab.com/maxhambraeus/axum-login-postgres-template).\n\n\u003e [!NOTE]\n\u003e See the [crate documentation][docs] for usage information.\n\n## 🦺 Safety\n\nThis crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in 100% safe Rust.\n\n## 🛟 Getting Help\n\nWe've put together a number of [examples][examples] to help get you started. You're also welcome to [open a discussion](https://github.com/maxcountryman/axum-login/discussions/new?category=q-a) and ask additional questions you might have.\n\n## 👯 Contributing\n\nWe appreciate all kinds of contributions, thank you!\n\n[sqlite-example]: https://github.com/maxcountryman/axum-login/tree/main/examples/sqlite\n[examples]: https://github.com/maxcountryman/axum-login/tree/main/examples\n[docs]: https://docs.rs/axum-login\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcountryman%2Faxum-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxcountryman%2Faxum-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcountryman%2Faxum-login/lists"}