DidWeb (did_web v0.1.0)
This module contains functions to resolve a Web DID.
Summary
Functions
Resolves the URL from a Web DID, gets the DID document from the URL, and validates the return DID document.
Resolve the URL of a Web DID.
Functions
Resolves the URL from a Web DID, gets the DID document from the URL, and validates the return DID document.
Currently, only the DID document "id" is validated to be equal to the provided Web DID.
Returns the resolved DID document or an error.
Examples
> DidWeb.resolve("did:web:example.com)
{:ok, did_document}
Resolve the URL of a Web DID.
Returns the resolved URL or an error.
Examples
iex> DidWeb.resolve_url("did:web:example.com")
{:ok, "https://example.com/.well-known/did.json"}
iex> DidWeb.resolve_url("did:web:example.com%3A3000:some:path")
{:ok, "https://example.com:3000/some/path/did.json"}