perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Cover relative DID doc fragments in identity tests

alice 1f1d7c30 99274dc6

+26
+26
t/identity.t
··· 18 18 19 19 use ATProto::PDS::Identity qw( 20 20 account_did 21 + account_did_doc_valid_for_service 21 22 did_to_path 22 23 is_valid_handle 23 24 normalize_handle ··· 76 77 resolve_handle_to_did({ base_url => 'https://pds.example.com' }, 'not a handle'), 77 78 undef, 78 79 'handle resolution rejects invalid handles before any network lookup', 80 + ); 81 + 82 + ok( 83 + account_did_doc_valid_for_service( 84 + { base_url => 'https://pds.example.com' }, 85 + { 86 + did => 'did:web:pds.example.com:users:alice01', 87 + public_key_multibase => 'zExampleMultibaseKey', 88 + did_doc => { 89 + id => 'did:web:pds.example.com:users:alice01', 90 + service => [{ 91 + id => '#atproto_pds', 92 + type => 'AtprotoPersonalDataServer', 93 + serviceEndpoint => 'https://pds.example.com', 94 + }], 95 + verificationMethod => [{ 96 + id => '#atproto', 97 + controller => 'did:web:pds.example.com:users:alice01', 98 + publicKeyMultibase => 'zExampleMultibaseKey', 99 + }], 100 + assertionMethod => ['#atproto'], 101 + }, 102 + }, 103 + ), 104 + 'service DID-doc validation accepts relative service and verification ids', 79 105 ); 80 106 81 107 done_testing;