pub trait TokenExtractor: Send + Sync {
// Required method
fn extract_token(
parts: &mut Parts,
) -> impl Future<Output = Result<String, AuthError>> + Send;
}Expand description
Trait for extracting JWT tokens from HTTP requests.
Implement this trait to define custom token extraction strategies. The library provides implementations for common sources via the extractor macros.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.