spruceid / ssi

Core library for decentralized identity.
https://spruceid.dev
Apache License 2.0
193 stars 61 forks source link

Allow resolving did:webs with ports #519

Closed TaylorBeeston closed 1 year ago

TaylorBeeston commented 1 year ago

A few months ago, while maintaining the fork for LEF, I noticed that did:web's with ports currently aren't being resolved! The spec states to percent encode the colon as %3A for ports, so I added that in!

This is particularly useful when hosting dids locally and trying to resolve a did:web:localhost%3A3000 did during development. I also accounted for this by adjusting the http check from domain_name == "localhost" to domain_name.starts_with("localhost"), thereby allowing the domain localhost%3A3000 to still use http rather than https.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

TaylorBeeston commented 1 year ago

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

This is already done, and I've already got two other PRs merged here! (https://github.com/spruceid/ssi/pulls?q=is%3Apr+author%3ATaylorBeeston+is%3Aclosed)

(see https://github.com/spruceid/ssi/pull/442#issuecomment-1140058966)

sbihel commented 1 year ago

Thank you for the PR