decentralized-identity / did-jwt

Create and verify DID verifiable JWT's in Javascript
Apache License 2.0
331 stars 70 forks source link

Key mapping function #263

Closed sondreb closed 1 year ago

sondreb commented 1 year ago

Not sure if this is a feature that fits in the did-jwt package or somewhere else, but verifyJWS takes a list of VerificationMethod and when it is used, a manual DID Document resolution need to be made.

In the resulting DID Document, the assertionMethod can be used to verify the jws signature, but the issue is that sometimes keys can be referencing keys held in the verificationMethod list, like '#key0'.

Would be nice to have a utility function that could take an DID Document and resolve all keys for different sections, not just an aggregate, but allowing the consumers of the function to tell which keys to get, e.g. assertionMethod or authentication.

mirceanis commented 1 year ago

This makes sense, and would definitely be useful, but it sounds more like a feature for the did-resolver library, don't you think?

Would you like to contribute an implementation?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.