[][src]Trait http_sig::KeyProvider

pub trait KeyProvider: Debug + Sync + 'static {
    fn provide_key(
        &self,
        name: Option<&str>,
        key_id: &str
    ) -> Option<&dyn HttpSignature>; }

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

fn provide_key(
    &self,
    name: Option<&str>,
    key_id: &str
) -> Option<&dyn HttpSignature>

Given the name of an algorithm (eg. hmac-sha256) and the key ID, return an appropriate key and algorithm. Returns None if no appropriate key/algorithm combination could be found.

Loading content...

Implementors

impl KeyProvider for SimpleKeyProvider[src]

Loading content...