3 Commits

Author SHA1 Message Date
bnewbold
c2f47b725d
identity: parse support for newer DID document format (Multikey) (#1475)
* identity: parse support for newer DID document format (Multikey)

* identity: lint fixes

* identity: DID doc parsing allow full DID URL in service 'id'

* add parse/format multikey methods

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-08-25 10:19:27 -05:00
bnewbold
a280ae21e1
identifier tweaks (#1085)
* nsid: reduce 'name' length from 128 chars to 63 chars

* nsid: remove 'nsid-ns' (glob pattern) from main NSID syntax validation

This special variant syntax should be handled separately. Eg, an
"nsid-ns" should not be accepted as an NSID in Lexicons looking for a
regular NSID.

* nsid: update syntax check to match domain rules

This is to be closer to actual underlying specification needs. For
example, domains are allowed to start with a digit (like 4chan.org), and
can't start *or* end with a hyphen.

Restricts the "name" part further, to be alphabetic only.

Note that starts-with-digit domains could break some lang
auto-generation variable name rules. The docs/spec strongly recommend
against such domains for use with NSID, but it seems incorrect to
restrict at the standard/lexicon level without a clear pan-language
consistent set of rules.

* did-resolver: disallow did:web with path segments

* identifier: reduce max length of DID from 8 KB to 2 KB

* identifier: add DID test with escaped ':' in identifier

* did-resolver: have prettier run on tests/

* identifier: add additional punycode test cases

* identifiers: small tweaks from review

- type in did:web comment
- include actual max DID string length in error message

* xrpc-server tests: remove digits from NSIDs

* identity: fix import and function errors

* xrpc-server tests: remove digits from NSIDs

* xrpc-server: include tests/ in prettier:fix

* xrpc-server: lint fix
2023-05-31 16:56:08 -07:00
Daniel Holmgren
743eaf1cf0
Move handle resolution to .well-known (#1048)
* move handle resolution to .well-known

* required handle on resolveHandle

* rm test

* tidy

* tidy

* fix up appview

* missing await

* atproto-handle -> atproto-did

* shift did & handle resolution to new identity package

* fix up network mocks

* fix up another test

* one more

* drop lex comment

* rm handle param

* Update packages/identity/src/handle/index.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* still temporarily support xrpc handle resolution

* typo

* ensure return value is a string

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-05-25 19:04:10 -05:00