Rules for matrix parameter vs. resolver option (was: Re: Proposed work item: did:key DID Method)

On 11/24/19 10:28 PM, Markus Sabadello wrote:
> It may actually be better to do something like this with a resolver 
> input option, rather than a DID URL matrix parameter.

I'd personally prefer it as a resolver input option. Again, we can stuff
a ton of functionality into matrix parameters, but just because we can
doesn't mean we should.

What we don't have is a clear set of rules for when something should be
a matrix parameter and when something should be a resolver input option.

Attempting a first cut at those rules here:

Matrix parameters are used when you need a mechanism to store a DID with
information that's critical to the intended usage of the DID. For
example, writing a DID to a database where you want to specify that you
want to use a very specific version of a DID Document associated with a DID.

Resolver input options are used when what is critical to the usage of a
DID Document combination cannot be predetermined. For example, whether
an entity wants the resolver to resolve the public keys in the DID
Document in JWK format or in native format.

Don't know if others agree with those rules, or have a suggestion on a
different set of rules when one should pick between using a matrix
parameter or a resolver option.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
Founder/CEO - Digital Bazaar, Inc.
blog: Veres One Decentralized Identifier Blockchain Launches
https://tinyurl.com/veres-one-launches

Received on Monday, 25 November 2019 22:20:05 UTC