fix not path in did web
This commit is contained in:
parent
fb6e1270ee
commit
d3e8580d00
|
@ -26,7 +26,9 @@ def key_to_did(public_key_bytes, url):
|
||||||
u = urlparse(url)
|
u = urlparse(url)
|
||||||
domain = u.netloc
|
domain = u.netloc
|
||||||
path = u.path.strip("/").replace("/", ":")
|
path = u.path.strip("/").replace("/", ":")
|
||||||
|
if path:
|
||||||
return f"did:web:{domain}:{path}:{did}"
|
return f"did:web:{domain}:{path}:{did}"
|
||||||
|
return f"did:web:{domain}:{did}"
|
||||||
|
|
||||||
return f"did:key:{did}"
|
return f"did:key:{did}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue