pub trait TokenExtractor: Send + Sync {
// Required methods
fn extract_token(
&self,
headers: &dyn Headers,
) -> Result<Option<String>, JwtError>;
fn description(&self) -> &str;
}Expand description
Trait for extracting JWT tokens from HTTP headers
This trait defines the interface for extracting JWT tokens from HTTP headers. Implementations can extract tokens from different headers, with different prefixes, or using custom logic.
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get a description of this extractor for debugging