pub trait KeyResolver: Send + Sync {
// Required method
fn resolve_key<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 DidUrl,
relationship: VerificationRelationship,
) -> Pin<Box<dyn Future<Output = Result<Jwk, KeyResolutionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Available on crate feature
vc only.Expand description
Finds the public key a JWT was signed with, given the DID URL in its kid.
Resolver implements it by dereferencing the URL; an application can implement it over a
cache, a JWKS, or a fixed set of trusted keys.
Required Methods§
Sourcefn resolve_key<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 DidUrl,
relationship: VerificationRelationship,
) -> Pin<Box<dyn Future<Output = Result<Jwk, KeyResolutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_key<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 DidUrl,
relationship: VerificationRelationship,
) -> Pin<Box<dyn Future<Output = Result<Jwk, KeyResolutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The public key of the verification method url names, which must be usable for
relationship: assertionMethod for a credential, authentication for a presentation.
§Errors
A KeyResolutionError when the DID does not resolve, the method does not exist or is
not usable for relationship, or its material cannot be read as a JWK.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".