pub trait KeyVerifier: Send + Sync {
// Required methods
fn extract(
&self,
x_api_key: Option<&str>,
authorization: Option<&str>,
) -> Option<String>;
fn verify(&self, provided: Option<&str>, expected: &str) -> bool;
}Expand description
Extracts and verifies the caller’s API key.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".