hyperledger-archives / aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
https://wiki.hyperledger.org/display/ARIES/aries-framework-go
Apache License 2.0
240 stars 161 forks source link

DID resolver - Validate input DID #20

Open fqutishat opened 5 years ago

fqutishat commented 5 years ago

Validate input DID conforms to the did rule of the Generic DID Syntax.

////////////////////////////////////////////////// did = "did:" method-name ":" method-specific-id method-name = 1method-char method-char = %x61-7A / DIGIT method-specific-id = idchar ( ":" idchar ) idchar = ALPHA / DIGIT / "." / "-" / "" did-url = did ( ";" param ) path-abempty [ "?" query ] [ "#" fragment ] param = param-name [ "=" param-value ] param-name = 1param-char param-value = *param-char param-char = ALPHA / DIGIT / "." / "-" / "" / ":" / pct-encoded

////////////////////////////////////////////////////

There is implementation in java

https://github.com/decentralized-identity/did-common-java/tree/master/src/main/java/did/parser

llorllale commented 5 years ago

This was done in #18