Skip to content

Commit bd7c9cb

Browse files
committed
check issue credentials in issuer revocation keys
1 parent 60a0c50 commit bd7c9cb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/handlers/auth.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ describe('auth', () => {
20682068
expect(token).to.be.a('object');
20692069
});
20702070

2071-
it('key rotation use case', async () => {
2071+
it.only('key rotation use case', async () => {
20722072
const claimReq: CredentialRequest = {
20732073
credentialSchema:
20742074
'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v4.json',
@@ -2206,6 +2206,10 @@ describe('auth', () => {
22062206
);
22072207
expect(issuerAuthCredential2).to.be.deep.equal(credential2);
22082208

2209+
// check we can issue new credential with k2
2210+
const issuerCred2 = await idWallet.issueCredential(issuerDID, claimReq);
2211+
expect(issuerCred2).to.be.not.undefined;
2212+
22092213
const treesModel2 = await idWallet.getDIDTreeModel(issuerDID);
22102214
const [ctrHex2, rtrHex2, rorTrHex2] = await Promise.all([
22112215
treesModel2.claimsTree.root(),
@@ -2230,6 +2234,11 @@ describe('auth', () => {
22302234
'no auth credentials found'
22312235
);
22322236

2237+
// check that we can't issue new credential
2238+
await expect(idWallet.issueCredential(issuerDID, claimReq)).to.rejectedWith(
2239+
'no auth credentials found'
2240+
);
2241+
22332242
// should this work?
22342243
await handleAuthorizationRequest(userDID, authReqBody);
22352244
});

0 commit comments

Comments
 (0)