sa-token-plugin-axum
Axum framework integration for sa-token-rust.
Features
- ⚡ High Performance: Built for Axum 0.7+
- 🎯 Easy Integration: Middleware and extractors
- 🔧 Flexible: Multiple configuration options
- 🛡️ Complete: Full authentication and authorization support
Installation
[]
= { = "0.1.12", = ["redis"] }
= "0.8"
= { = "1", = ["full"] }
Quick Start
use ;
use ;
use MemoryStorage;
use Arc;
async
async
Configuration
let state = builder
.storage
.token_name
.timeout
.auto_renew
.token_style
.build;
Extractors
SaTokenExtractor: Required tokenOptionalSaTokenExtractor: Optional tokenLoginIdExtractor: Get current login ID
Version History
0.1.12
- ✨ Added path-based authentication support for fine-grained access control
- 🔧 Optimized middleware implementation, reduced code duplication
0.1.11
- Initial release with basic features
Author
金书记
License
Licensed under either of Apache-2.0 or MIT.