pub struct DIDResolver;Expand description
Human-readable DID resolver.
Maps a DID string to a deterministic, valid HTTPS endpoint URL and
verification-method identifier according to the DID method’s resolution
convention. This is not HTTP resolution (no network call is made); it
produces the URL that would be fetched by a universal resolver / the
method’s native resolution endpoint. This module is not a hot path, so it
owns Strings freely.
§Supported methods
| Method | Endpoint URL | Verification method |
|---|---|---|
did:q42: | https://q42.network/agents/{id_hex} | {did}#q42-key |
did:web: | https://{domain}/.well-known/did.json | {did}#key-1 |
did:key: | https://dev.uniresolver.io/1.0/identifiers/{did} | {did} |
Implementations§
Source§impl DIDResolver
impl DIDResolver
Sourcepub fn resolve(&self, did: &str) -> Result<DidResolutionResult, String>
pub fn resolve(&self, did: &str) -> Result<DidResolutionResult, String>
Resolve a DID to a human-readable endpoint URL and verification method.
Delegates to Self::resolve_did; provided as the canonical entry point
named in the SPARQL-DID Integration Specification.
Sourcepub fn resolve_did(&self, did: &str) -> Result<DidResolutionResult, String>
pub fn resolve_did(&self, did: &str) -> Result<DidResolutionResult, String>
Resolve a DID to a human-readable endpoint URL and verification method.
Sourcepub fn verify_authentication_signature(
&self,
did: &str,
signature: &[u8],
payload: &[u8],
) -> Result<bool, String>
pub fn verify_authentication_signature( &self, did: &str, signature: &[u8], payload: &[u8], ) -> Result<bool, String>
Verify a DID’s authentication signature.
This performs only the structural checks available to the read-side
SPARQL query layer (that the DID is well-formed and resolvable, and that
a non-empty signature and payload were supplied). The actual
cryptographic verification requires public-key material that this shim
deliberately does not hold — it is the responsibility of the identity /
key-vault layer (crate::key_vault::KeyVault::verify_signature /
WebizenIdentityRegistry::verify_signature).
Fails closed: never reports a signature as valid from this layer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DIDResolver
impl RefUnwindSafe for DIDResolver
impl Send for DIDResolver
impl Sync for DIDResolver
impl Unpin for DIDResolver
impl UnsafeUnpin for DIDResolver
impl UnwindSafe for DIDResolver
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more