Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed May 20, 2023
1 parent 8254d82 commit e2d2876
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 32 deletions.
4 changes: 2 additions & 2 deletions packages/callback-example/lib/IssuerCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Ed25519Signature2020 } from '@digitalcredentials/ed25519-signature-2020
import { Ed25519VerificationKey2020 } from '@digitalcredentials/ed25519-verification-key-2020'
import { securityLoader } from '@digitalcredentials/security-document-loader'
import vc from '@digitalcredentials/vc'
import { CredentialRequestV1_0_08 } from '@sphereon/oid4vci-common'
import { CredentialRequestV1_0_11 } from '@sphereon/oid4vci-common'
import { ICredential, W3CVerifiableCredential } from '@sphereon/ssi-types'

// Example on how to generate a did:key to issue a verifiable credential
Expand All @@ -19,7 +19,7 @@ export const getIssuerCallback = (credential: ICredential, keyPair: any, verific
throw new Error('A credential needs to be provided')
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
return async (_opts: { credentialRequest?: CredentialRequestV1_0_08; credential?: ICredential }): Promise<W3CVerifiableCredential> => {
return async (_opts: { credentialRequest?: CredentialRequestV1_0_11; credential?: ICredential }): Promise<W3CVerifiableCredential> => {
const documentLoader = securityLoader().build()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const verificationKey: any = Array.from(keyPair.values())[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ xdescribe('issuerCallback', () => {

const credentialResponse = await vcIssuer.issueCredentialFromIssueRequest({
credentialRequest: credentialRequest,
issuerState: state,
responseCNonce: state,
issuerCallback: getIssuerCallback(credential, didKey.keyPairs, didKey.didDocument.verificationMethod[0].id),
})

Expand Down
4 changes: 3 additions & 1 deletion packages/client/lib/CredentialRequestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export class CredentialRequestClient {
}): Promise<UniformCredentialRequest> {
const { proofInput } = opts;
const formatSelection = opts.format ?? this.credentialRequestOpts.format;
const format: OID4VCICredentialFormat = (formatSelection === 'jwt_vc' ? 'jwt_vc_json_ld' : formatSelection) as OID4VCICredentialFormat;
const format: OID4VCICredentialFormat = (
formatSelection === 'jwt_vc' || formatSelection === 'jwt' ? 'jwt_vc_json_ld' : formatSelection
) as OID4VCICredentialFormat;
if (!format) {
throw Error(`Format of credential to be issued is missing`);
} else if (format !== 'jwt_vc_json_ld' && format !== 'jwt_vc_json' && format !== 'ldp_vc') {
Expand Down
4 changes: 4 additions & 0 deletions packages/client/lib/__tests__/AccessTokenClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ describe('AccessTokenClient should', () => {
nock.cleanAll();
});

afterEach(() => {
nock.cleanAll();
});

it(
'get Access Token for with pre-authorized code without resulting in errors',
async () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/client/lib/__tests__/AuthzFlowType.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AuthzFlowType, CredentialOfferPayloadV1_0_09 } from '@sphereon/oid4vci-common';
import { AuthzFlowType, CredentialOfferPayload } from '@sphereon/oid4vci-common';

//todo: this file is just testing v9, we probably want to add v11 tests here as well
describe('Authorization Flow Type determination', () => {
Expand All @@ -7,15 +7,15 @@ describe('Authorization Flow Type determination', () => {
AuthzFlowType.valueOf({
issuer: 'test',
credential_type: 'test',
} as CredentialOfferPayloadV1_0_09)
} as CredentialOfferPayload)
).toEqual(AuthzFlowType.AUTHORIZATION_CODE_FLOW);
});
it('should return authorization code flow type with a credential_type array', () => {
expect(
AuthzFlowType.valueOf({
issuer: 'test',
credential_type: ['test', 'test1'],
} as CredentialOfferPayloadV1_0_09)
} as CredentialOfferPayload)
).toEqual(AuthzFlowType.AUTHORIZATION_CODE_FLOW);
});
it('should return pre-authorized code flow with a single credential_type', () => {
Expand All @@ -24,7 +24,7 @@ describe('Authorization Flow Type determination', () => {
issuer: 'test',
credential_type: 'test',
'pre-authorized_code': 'test',
} as CredentialOfferPayloadV1_0_09)
} as CredentialOfferPayload)
).toEqual(AuthzFlowType.PRE_AUTHORIZED_CODE_FLOW);
});
it('should return pre-authorized code flow with a credential_type array', () => {
Expand All @@ -33,7 +33,7 @@ describe('Authorization Flow Type determination', () => {
issuer: 'test',
credential_type: ['test', 'test1'],
'pre-authorized_code': 'test',
} as CredentialOfferPayloadV1_0_09)
} as CredentialOfferPayload)
).toEqual(AuthzFlowType.PRE_AUTHORIZED_CODE_FLOW);
});
});
20 changes: 12 additions & 8 deletions packages/client/lib/__tests__/CredentialRequestClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ beforeEach(async () => {
nock(IDENTIPROOF_ISSUER_URL).get(WellKnownEndpoints.OPENID4VCI_ISSUER).reply(200, JSON.stringify(IDENTIPROOF_OID4VCI_METADATA));
});

afterEach(async () => {
nock.cleanAll();
});
describe('Credential Request Client ', () => {
it('should get a failed credential response with an unsupported format', async function () {
const basePath = 'https://sphereonjunit2022101301.com/';
Expand Down Expand Up @@ -117,7 +120,7 @@ describe('Credential Request Client ', () => {
.build();
const credentialRequest = await credReqClient.createCredentialRequest({ proofInput: proof, format: 'jwt' });
expect(credentialRequest.proof?.jwt?.includes(partialJWT)).toBeTruthy();
expect(credentialRequest.format).toEqual('jwt');
expect(credentialRequest.format).toEqual('jwt_vc_json_ld');
const result = await credReqClient.acquireCredentialsUsingRequest(credentialRequest);
expect(result?.successBody?.credential).toEqual(mockedVC);
});
Expand Down Expand Up @@ -170,7 +173,7 @@ describe('Credential Request Client with different issuers ', () => {
it('should create correct CredentialRequest for Spruce', async () => {
const IRR_URI =
'openid-initiate-issuance://?issuer=https%3A%2F%2Fngi%2Doidc4vci%2Dtest%2Espruceid%2Exyz&credential_type=OpenBadgeCredential&pre-authorized_code=eyJhbGciOiJFUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdLCJleHAiOiIyMDIzLTA0LTIwVDA5OjA0OjM2WiIsIm5vbmNlIjoibWFibmVpT0VSZVB3V3BuRFFweEt3UnRsVVRFRlhGUEwifQ.qOZRPN8sTv_knhp7WaWte2-aDULaPZX--2i9unF6QDQNUllqDhvxgIHMDCYHCV8O2_Gj-T2x1J84fDMajE3asg&user_pin_required=false';
const credentialOffer = await (
const credentialRequest = await (
await CredentialRequestClientBuilder.fromURI({
uri: IRR_URI,
metadata: getMockData('spruce')?.metadata as unknown as EndpointMetadata,
Expand All @@ -183,14 +186,14 @@ describe('Credential Request Client with different issuers ', () => {
jwt: getMockData('spruce')?.credential.request.proof.jwt as string,
},
credentialTypes: ['OpenBadgeCredential'],
format: 'jwt_vc',
format: 'jwt_vc_json_ld',
});
expect(credentialOffer).toEqual(getMockData('spruce')?.credential.request);
expect(credentialRequest).toEqual(getMockData('spruce')?.credential.request);
});

it('should create correct CredentialRequest for Walt', async () => {
const IRR_URI =
'openid-initiate-issuance://?issuer=https%3A%2F%2Fjff.walt.id%2Fissuer-api%2Fdefault%2Foidc%2F&amp;credential_type=OpenBadgeCredential&amp;pre-authorized_code=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwMTc4OTNjYy04ZTY3LTQxNzItYWZlOS1lODcyYmYxNDBlNWMiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.ODfq2AIhOcB61dAb3zMrXBJjPJaf53zkeHh_AssYyYA&amp;user_pin_required=false';
'openid-initiate-issuance://?issuer=https%3A%2F%2Fjff.walt.id%2Fissuer-api%2Fdefault%2Foidc%2F&credential_type=OpenBadgeCredential&pre-authorized_code=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwMTc4OTNjYy04ZTY3LTQxNzItYWZlOS1lODcyYmYxNDBlNWMiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.ODfq2AIhOcB61dAb3zMrXBJjPJaf53zkeHh_AssYyYA&user_pin_required=false';
const credentialOffer = await (
await CredentialRequestClientBuilder.fromURI({
uri: IRR_URI,
Expand All @@ -209,9 +212,10 @@ describe('Credential Request Client with different issuers ', () => {
expect(credentialOffer).toEqual(getMockData('walt')?.credential.request);
});

it('should create correct CredentialRequest for uniissuer', async () => {
// Missing the issuer required property
xit('should create correct CredentialRequest for uniissuer', async () => {
const IRR_URI =
'https://oidc4vc.uniissuer.io/&credential_type=OpenBadgeCredential&pre-authorized_code=0ApoI8rxVmdQ44RIpuDbFIURIIkOhyek&user_pin_required=false';
'https://oidc4vc.uniissuer.io/?credential_type=OpenBadgeCredential&pre-authorized_code=0ApoI8rxVmdQ44RIpuDbFIURIIkOhyek&user_pin_required=false';
const credentialOffer = await (
await CredentialRequestClientBuilder.fromURI({
uri: IRR_URI,
Expand Down Expand Up @@ -253,7 +257,7 @@ describe('Credential Request Client with different issuers ', () => {

it('should create correct CredentialRequest for diwala', async () => {
const IRR_URI =
'openid-initiate-issuance://?issuer=https://oidc4vc.diwala.io&amp;credential_type=OpenBadgeCredential&amp;pre-authorized_code=eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTg0NDY3fQ.fEAHKz2nuWfiYHw406iNxr-81pWkNkbi31bWsYSf6Ng';
'openid-initiate-issuance://?issuer=https://oidc4vc.diwala.io&credential_type=OpenBadgeCredential&pre-authorized_code=eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTg0NDY3fQ.fEAHKz2nuWfiYHw406iNxr-81pWkNkbi31bWsYSf6Ng';
const credentialOffer = await (
await CredentialRequestClientBuilder.fromURI({
uri: IRR_URI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ describe('Credential Request Client Builder', () => {
await proofOfPossessionVerifierCallbackFunction({ ...proof, kid });
const credentialRequest: UniformCredentialRequest = await credReqClient.createCredentialRequest({ proofInput: proof });
expect(credentialRequest.proof?.jwt).toContain(partialJWT);
expect('type' in credentialRequest).toBe(true);
if ('type' in credentialRequest) {
expect(credentialRequest.type).toBe('https://imsglobal.github.io/openbadges-specification/ob_v3p0.html#OpenBadgeCredential');
expect('types' in credentialRequest).toBe(true);
if ('types' in credentialRequest) {
expect(credentialRequest.types).toStrictEqual(['https://imsglobal.github.io/openbadges-specification/ob_v3p0.html#OpenBadgeCredential']);
}
});

Expand Down
7 changes: 7 additions & 0 deletions packages/client/lib/__tests__/IT.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ describe('OID4VCI-Client should', () => {
async function proofOfPossessionCallbackFunction(_args: Jwt, _kid?: string): Promise<string> {
return 'ey.val.ue';
}
beforeEach(() => {
nock.cleanAll();
});
afterEach(() => {
nock.cleanAll();
});

// Access token mocks
const mockedAccessTokenResponse: AccessTokenResponse = {
Expand Down Expand Up @@ -89,6 +95,7 @@ describe('OID4VCI-Client should', () => {

const credentialResponse = await client.acquireCredentials({
credentialTypes: 'OpenBadgeCredential',
format: 'jwt_vc_json_ld',
proofCallbacks: {
signCallback: proofOfPossessionCallbackFunction,
},
Expand Down
5 changes: 5 additions & 0 deletions packages/client/lib/__tests__/MetadataClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ describe('MetadataClient with IdentiProof Issuer should', () => {
beforeAll(() => {
nock.cleanAll();
});

afterEach(() => {
nock.cleanAll();
});

it('succeed with OID4VCI and separate AS metadata', async () => {
nock(IDENTIPROOF_ISSUER_URL).get(WellKnownEndpoints.OPENID4VCI_ISSUER).reply(200, JSON.stringify(IDENTIPROOF_OID4VCI_METADATA));

Expand Down
2 changes: 1 addition & 1 deletion packages/client/lib/__tests__/MetadataMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const INITIATION_TEST: CredentialOfferRequestWithBaseUrl = {
},
},
original_credential_offer: {
credential_type: 'OpenBadgeCredential',
credential_type: ['OpenBadgeCredential'],
issuer: 'https://jff.walt.id/issuer-api/oidc/',
'pre-authorized_code':
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhOTUyZjUxNi1jYWVmLTQ4YjMtODIxYy00OTRkYzgyNjljZjAiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.YE5DlalcLC2ChGEg47CQDaN1gTxbaQqSclIVqsSAUHE',
Expand Down
20 changes: 10 additions & 10 deletions packages/client/lib/__tests__/data/VciDataFixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export interface IssuerMockData {
url: string;
deeplink: string;
request: {
type: [string];
format: 'jwt_vc' | 'ldp_vc' | string;
types: [string];
format: 'jwt_vc' | 'ldp_vc' | 'jwt_vc_json_ld' | string;
proof: {
proof_type: 'jwt' | string;
jwt: string;
Expand Down Expand Up @@ -110,8 +110,8 @@ const mockData: VciMockDataStructure = {
deeplink:
'openid-initiate-issuance://?issuer=https%3A%2F%2Fngi%2Doidc4vci%2Dtest%2Espruceid%2Exyz&credential_type=OpenBadgeCredential&pre-authorized_code=eyJhbGciOiJFUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdLCJleHAiOiIyMDIzLTA0LTIwVDA5OjA0OjM2WiIsIm5vbmNlIjoibWFibmVpT0VSZVB3V3BuRFFweEt3UnRsVVRFRlhGUEwifQ.qOZRPN8sTv_knhp7WaWte2-aDULaPZX--2i9unF6QDQNUllqDhvxgIHMDCYHCV8O2_Gj-T2x1J84fDMajE3asg&user_pin_required=false',
request: {
type: ['OpenBadgeCredential'],
format: 'jwt_vc',
types: ['OpenBadgeCredential'],
format: 'jwt_vc_json_ld',
proof: {
proof_type: 'jwt',
jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlV6STFOa3NpTENKMWMyVWlPaUp6YVdjaUxDSnJkSGtpT2lKRlF5SXNJbU55ZGlJNkluTmxZM0F5TlRack1TSXNJbmdpT2lKclpuVmpTa0V0VEhKck9VWjBPRmx5TFVkMlQzSmpia3N3YjNkc2RqUlhNblUwU3pJeFNHZHZTVlIzSWl3aWVTSTZJalozY0ZCUE1rOUNRVXBTU0ZFMVRXdEtXVlJaV0dsQlJFUXdOMU5OTlV0amVXcDNYMkUzVUUxWmVGa2lmUSMwIn0.eyJhdWQiOiJodHRwczovL25naS1vaWRjNHZjaS10ZXN0LnNwcnVjZWlkLnh5eiIsImlhdCI6MTY4MTkxMTA2MC45NDIsImV4cCI6MTY4MTkxMTcyMC45NDIsImlzcyI6InNwaGVyZW9uOnNzaS13YWxsZXQiLCJqdGkiOiJhNjA4MzMxZi02ZmE0LTQ0ZjAtYWNkZWY5NmFjMjdmNmQ3MCJ9.NwF3_41gwnlIdd_6Uk9CczeQHzIQt6UcvTT5Cxv72j9S1vNwiY9annA2kLsjsTiR5-WMBdUhJCO7wYCtZ15mxw',
Expand Down Expand Up @@ -356,8 +356,8 @@ const mockData: VciMockDataStructure = {
'openid-initiate-issuance://?issuer=https%3A%2F%2Fjff.walt.id%2Fissuer-api%2Fdefault%2Foidc%2F&amp;credential_type=OpenBadgeCredential&amp;pre-authorized_code=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwMTc4OTNjYy04ZTY3LTQxNzItYWZlOS1lODcyYmYxNDBlNWMiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.ODfq2AIhOcB61dAb3zMrXBJjPJaf53zkeHh_AssYyYA&amp;user_pin_required=false',
url: 'https://jff.walt.id/issuer-api/default/oidc/credential',
request: {
type: ['OpenBadgeCredential'],
format: 'jwt_vc',
types: ['OpenBadgeCredential'],
format: 'jwt_vc_json_ld',
proof: {
proof_type: 'jwt',
jwt: 'eyJ0eXAiOiJKV1QiLCJhb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9mIHRoZSBKRkYgUGx1Z2Zlc3QgMiBpbiBBdWd1c3QtTm92ZW1iZXIgb2YgMjAyMiBjb2xsYWJvcmF0ZWQgdG8gcHVzaCBpbnRlcm9wZXJhYmlsaXR5IG9mIFZDcyBpbiBlZHVjYXRpb24gZm9yd2FyZC4iLCJ0eXBlIjoiQ3JpdGVyaWEifSwiZGVzY3JpcHRpb24iOiJUaGlzIHdhbGxldCBjYW4gZGlzcGxheSB0aGlzIE9wZW4gQmFkZ2UgMy4wIiwiaWQiOiIwIiwiaW1hZ2UiOnsiaWQiOiJodHRwczovL3czYy1jY2cuZ2l0aHViLmlvL3ZjLWVkL3BsdWdmZXN0LTItMjAyMi9pbWFnZXMvSkZGLVZDLUVEVS1QTFVHRkVTVDItYmFkZ2UtaW1hZ2UucG5nIiwidHlwZSI6IkltYWdlIn0sIm5hbWUiOiJPdXIgV2FsbGV0IFBhc3NlZCBKRkYgUGx1Z2Zlc3QgIzIgMjAyMiIsInR5cGUiOiJBY2hpZXZlbWVudCJ9LCJ0eXBlIjoiQWNoaWV2ZW1lbnRTdWJqZWN0In0sIm5hbWUiOiJBY2hpZXZlbWVudCBDcmVkZW50aWFsIn0sImp0aSI6InVybjp1dWlkOmM0YTA4MDYzLTc4ZTUtNDdkNS04NGY5LTg2YTFmNjNiYzNkYSJ9.AM-lAUjCjcuQgy1QhQXctd3YrUoC2UdXvOwDHcHsi_UuHX0nt__QrYlfcwUutc9gSsz-U9SZ1e6iAGarTNVbDQ',
format: 'jwt_vc',
format: 'jwt_vc_json_ld',
},
},
},
Expand Down Expand Up @@ -474,7 +474,7 @@ const mockData: VciMockDataStructure = {
'https://oidc4vc.uniissuer.io/&credential_type=OpenBadgeCredential&pre-authorized_code=0ApoI8rxVmdQ44RIpuDbFIURIIkOhyek&user_pin_required=false',
url: 'https://oidc4vc.uniissuer.io/1.0/credential',
request: {
type: ['OpenBadgeCredential'],
types: ['OpenBadgeCredential'],
format: 'jwt_vc',
proof: {
proof_type: 'jwt',
Expand Down Expand Up @@ -573,7 +573,7 @@ const mockData: VciMockDataStructure = {
'openid-initiate-issuance://?issuer=https://launchpad.mattrlabs.com&credential_type=OpenBadgeCredential&pre-authorized_code=g0UCOj6RAN5AwHU6gczm_GzB4_lH6GW39Z0Dl2DOOiO',
url: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential',
request: {
type: ['OpenBadgeCredential'],
types: ['OpenBadgeCredential'],
format: 'ldp_vc',
proof: {
proof_type: 'jwt',
Expand Down Expand Up @@ -687,7 +687,7 @@ const mockData: VciMockDataStructure = {
'openid-initiate-issuance://?issuer=https://oidc4vc.diwala.io&amp;credential_type=OpenBadgeCredential&amp;pre-authorized_code=eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTg0NDY3fQ.fEAHKz2nuWfiYHw406iNxr-81pWkNkbi31bWsYSf6Ng',
url: 'https://oidc4vc.diwala.io/credential',
request: {
type: ['OpenBadgeCredential'],
types: ['OpenBadgeCredential'],
format: 'ldp_vc',
proof: {
proof_type: 'jwt',
Expand Down
Loading

0 comments on commit e2d2876

Please sign in to comment.