Axum Auth
High-level http auth extractors for axum
Usage
Bearer Authentication:
use AuthBearer;
/// Handler for a typical axum route, takes a `token` and returns it
async
Basic Authentication:
use AuthBasic;
/// Takes basic auth details and shows a message
async : AuthBasic)
Check out the crate documentation for more in-depth information into how both of these methods work!
Installation
Simply place the following inside of your Cargo.toml file:
[]
= "0.1"
Security
Some essential security considerations to take into account are the following:
- 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! 😊
- This crate purposefully does not limit the maximum length of headers arriving so please ensure your webserver configurations are set properly.
Licensing
This project is dual-licensed under both the MIT and Apache, so feel free to use either at your discretion.