pub struct DidUrl {
pub did: String,
pub fragment: Option<String>,
}Expand description
A parsed proof.verificationMethod DID URL.
Fields§
§did: StringThe DID without any fragment, e.g. did:web:notary.example.com.
fragment: Option<String>The fragment after #, when present — the key identifier.
Implementations§
Source§impl DidUrl
impl DidUrl
Sourcepub fn web_identifier(&self) -> Option<&str>
pub fn web_identifier(&self) -> Option<&str>
Returns the did:web method-specific identifier, if this is a
did:web DID.
Sourcepub fn web_document_url(&self) -> Option<String>
pub fn web_document_url(&self) -> Option<String>
Builds the HTTPS URL of the DID Document for a did:web DID
(spec §8.4.4 step 2).
Per the did:web method, colons in the identifier map to path
segments, and an identifier with no path resolves under
/.well-known/. Each segment is percent-decoded AFTER the split,
which is how a port written %3A8443 stays attached to the host
instead of becoming a path segment.
Sourcepub fn web_status_url(&self) -> Option<String>
pub fn web_status_url(&self) -> Option<String>
Builds the HTTPS URL of the DERIVED revocation status endpoint for a
did:web DID (spec §6.3.3.2 step 2).
§6.3.3.2 defines this by reference — “apply §8.4.4 step 2’s rule … then
suffix /.well-known/aph-status.json in place of
/.well-known/did.json” — so it shares Self::web_document_url’s
derivation exactly and differs only in the last path segment. Sharing
the body is the point: the two endpoints must agree about the host, or
the same-origin binding of §6.3.3.2 compares an origin against one the
same DID would never have produced.
This is the origin a verifier trusts. The statusListCredential value
an envelope carries is NEVER used to derive it — it is only ever bound
against it by same_origin.
Sourcepub fn dns_txt_name(&self) -> Option<String>
pub fn dns_txt_name(&self) -> Option<String>
Returns the registrable-domain portion used to build the DNS TXT name (spec §8.4.5 step 1), i.e. the host without any path segments.