Indicio-tech / pydid

Python library for validating, constructing, and representing DIDs and DID Documents
Apache License 2.0
11 stars 12 forks source link

DID_PATTERN does not accept = #61

Closed Jsyro closed 1 year ago

Jsyro commented 1 year ago

did:peer:2 supports entries that are base64 encoded, which may include = for padding. Ideally no did creating service should add this padding, however they maybe found and should be handled by this library.

This is the regex in this library for any DID.

This is the REGEX provided by the ID Foundation Spec for did:peer:2.

This is the example that includes a trailing =.

SICPA's peer-did-python library uses this library, and also includes it's own peer did regex that would allow for = (though they do not use the regex provided by the spec either).

Jsyro commented 1 year ago

See related clarification and spec change based on this finding. https://github.com/decentralized-identity/peer-did-method-spec/pull/52#event-9608136501

Jsyro commented 1 year ago

DID_PATTERN will not be changed to accept b64 padding characters. https://github.com/Indicio-tech/pydid/pull/62