Atex.IdentityResolver.DIDDocument (atex v0.3.0)
View SourceStruct and schema for describing and validating a DID document.
Summary
Functions
Get the associated ATProto handle in the DID document.
Types
@type t() :: %Atex.IdentityResolver.DIDDocument{ "@context": [String.t()], also_known_as: [String.t()] | nil, authentication: [String.t() | verification_method()] | nil, controller: (String.t() | [String.t()]) | nil, id: String.t(), service: [service()] | nil, verification_method: [verification_method()] | nil }
Functions
@spec from_json(map()) :: {:ok, t()} | {:error, Peri.Error.t()}
Get the associated ATProto handle in the DID document.
ATProto dictates that only the first valid handle is to be used, so this follows that rule.
Note
While DID documents are fairly authoritative, you need to make sure to
validate the handle bidirectionally. See
Atex.IdentityResolver.Handle.resolve/2
.