Skip to content

Commit

Permalink
Fix incorrect issuer IDs for GrottoNetworking.
Browse files Browse the repository at this point in the history
  • Loading branch information
tminard committed Apr 2, 2024
1 parent d038e90 commit 5b8a390
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions implementations/GrottoNetworking.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "Grotto Networking",
"implementation": "Grotto Selective Disclosure Libraries",
"issuers": [{
"id": "did:key:zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP#zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
"id": "did:key:zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
"endpoint": "https://ecdsa-sd.grotto-networking.com/credentials/issue",
"tags": ["ecdsa-sd-2023"],
"supportedEcdsaKeyTypes": ["P-256"]
},
{
"id": "did:key:zUC7DerdEmfZ8f4pFajXgGwJoMkV1ofMTmEG5UoNvnWiPiLuGKNeqgRpLH2TV4Xe5mJ2cXV76gRN7LFQwapF1VFu6x2yrr5ci1mXqC1WNUrnHnLgvfZfMH7h6xP6qsf9EKRQrPQ#zUC7DerdEmfZ8f4pFajXgGwJoMkV1ofMTmEG5UoNvnWiPiLuGKNeqgRpLH2TV4Xe5mJ2cXV76gRN7LFQwapF1VFu6x2yrr5ci1mXqC1WNUrnHnLgvfZfMH7h6xP6qsf9EKRQrPQ",
"id": "did:key:zUC7DerdEmfZ8f4pFajXgGwJoMkV1ofMTmEG5UoNvnWiPiLuGKNeqgRpLH2TV4Xe5mJ2cXV76gRN7LFQwapF1VFu6x2yrr5ci1mXqC1WNUrnHnLgvfZfMH7h6xP6qsf9EKRQrPQ",
"endpoint": "https://ecdsa-sd.grotto-networking.com/BBS/credentials/issue",
"tags": ["bbs-2023"]
}],
Expand Down
29 changes: 29 additions & 0 deletions test/implementations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,33 @@ describe('Loading implementations', () => {
it('result in no errors.', async () => {
should.exist(allImplementations);
});

describe('Implementations using DID:key identifiers', () => {
allImplementations.forEach(implementation => {
const {issuers, verifiers} = implementation;

const isDidKeyFilter = ({settings: {id}}) =>
id && id.startsWith('did:key');

describe(implementation.settings.name, () => {
issuers.filter(isDidKeyFilter)
.map(({settings: {id}}, index) => {
describe(`issuer[${index}].id`, () => {
it('should not specify a fragment', () => {
chai.expect(id).not.match(/#/);
});
});
});

verifiers.filter(isDidKeyFilter)
.map(({settings: {id}}, index) => {
describe(`verifier[${index}].id`, () => {
it('should not specify a fragment', () => {
chai.expect(id).not.match(/#/);
});
});
});
});
});
});
});

0 comments on commit 5b8a390

Please sign in to comment.