pub fn validate_did_document(document: &Value, expected_did: &str) -> Result<()>Expand description
Validate a DID document against the DID that was requested.
The id check is the one that matters: without it, plc.directory — or
whoever answers for a did:web host — can return a different account’s
document and every downstream decision is made about the wrong account.