Trait http_sig::KeyProvider
source · pub trait KeyProvider: Debug + Sync + 'static {
// Required method
fn provide_keys(&self, key_id: &str) -> Vec<Arc<dyn HttpSignatureVerify>>;
}
Expand description
The verification process will use this trait to find the appropriate key and algorithm to use for verifying a request.
You do not need to implement this yourself: the SimpleKeyProvider
type provides an
key store that should be suitable for many situations.
Required Methods§
sourcefn provide_keys(&self, key_id: &str) -> Vec<Arc<dyn HttpSignatureVerify>>
fn provide_keys(&self, key_id: &str) -> Vec<Arc<dyn HttpSignatureVerify>>
Given the name of an algorithm (eg. hmac-sha256
) and the key ID, return a set
of possible keys and algorithms. Returns an empty Vec if no appropriate key/algorithm
combination could be found.