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.9", = ["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
Author
金书记
License
Licensed under either of Apache-2.0 or MIT.