Trait ssi_jwk::JWKResolver

source ·
pub trait JWKResolver {
    // Required method
    async fn fetch_public_jwk(
        &self,
        key_id: Option<&str>,
    ) -> Result<Cow<'_, JWK>, ProofValidationError>;
}
Expand description

JWK resolver.

Any type that can fetch a JWK from its identifier.

Required Methods§

source

async fn fetch_public_jwk( &self, key_id: Option<&str>, ) -> Result<Cow<'_, JWK>, ProofValidationError>

Fetches a JWK by id.

The key identifier is optional since the key may be known in advance.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: JWKResolver> JWKResolver for &'a T

source§

async fn fetch_public_jwk( &self, key_id: Option<&str>, ) -> Result<Cow<'_, JWK>, ProofValidationError>

Implementors§