From a6b1eeaabc0f34cc13a79cf967a8c35a6d8dc7f5 Mon Sep 17 00:00:00 2001 From: sksadjad <86593551+sksadjad@users.noreply.github.com> Date: Thu, 20 Apr 2023 10:52:23 +0200 Subject: [PATCH] feat: Added new mock data from actual issuers, fixed a small bug with v1_0_08 types, updated v1_0_08 types to support data from jff issuers Signed-off-by: sksadjad <86593551+sksadjad@users.noreply.github.com> --- .../lib/__tests__/data/VciDataFixtures.ts | 737 ++++++++++++++++++ .../lib/__tests__/data/vci-payloads.json | 663 ++++++++++++++++ packages/common/lib/types/Generic.types.ts | 1 + packages/common/lib/types/index.ts | 1 + packages/common/lib/types/v1_0_08.types.ts | 8 +- 5 files changed, 1408 insertions(+), 2 deletions(-) create mode 100644 packages/client/lib/__tests__/data/VciDataFixtures.ts create mode 100644 packages/client/lib/__tests__/data/vci-payloads.json diff --git a/packages/client/lib/__tests__/data/VciDataFixtures.ts b/packages/client/lib/__tests__/data/VciDataFixtures.ts new file mode 100644 index 00000000..9d282ad1 --- /dev/null +++ b/packages/client/lib/__tests__/data/VciDataFixtures.ts @@ -0,0 +1,737 @@ +import { + CredentialSupportedBrief, + IssuerCredentialSubjectDisplay, + IssuerMetadataV1_0_08 +} from '@sphereon/openid4vci-common'; +import { ICredentialStatus, W3CVerifiableCredential } from '@sphereon/ssi-types'; + +export function getMockData(issuerName: string): IssuerMockData|null { + if (issuerName in mockData) { + return mockData[issuerName]; + } + return null +} + +export interface VciMockDataStructure { + [issuerName: string]: IssuerMockData; +} + +export interface IssuerMockData { + metadata: { + issuer?: string; + token_endpoint: string; + credential_endpoint: string; + openid4vci_metadata: IssuerMetadataV1_0_08; + }; + auth: { + url: string; + method?: string; + request: { + client_id: string; + grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code' | 'authorization_code' | 'password'; + 'pre-authorized_code'?: string; + }; + response: { + access_token: string; + token_type: string; + expires_in: number; + c_nonce?: string; + c_nonce_expires_in?: number; + refresh_token?: string; + id_token?: string; + scope?: string; + }; + }; + credential: { + url: string; + request: { + type: string; + format: 'jwt_vc' | 'ldp_vc' | string; + proof: { + proof_type: 'jwt' | string; + jwt: string; + }; + }; + response: { + format?: 'jwt_vc' | 'w3cvc-jsonld' | string; + credential: W3CVerifiableCredential; + acceptance_token?: string; + c_nonce?: string; + c_nonce_expires_in?: number; + }; + }; +} + +const mockData: VciMockDataStructure = { + spruce: { + metadata: { + issuer: 'https://ngi-oidc4vci-test.spruceid.xyz', + token_endpoint: 'https://ngi-oidc4vci-testspruceid.xyz/token', + credential_endpoint: 'https://ngi-oidc4vci-test.spruceid.xyz/credential', + openid4vci_metadata: { + issuer: 'https://ngi-oidc4vci-test.spruceid.xyz', + credential_endpoint: 'https://ngi-oidc4vci-test.spruceid.xyz/credential', + token_endpoint: 'https://ngi-oidc4vci-test.spruceid.xyz/token', + jwks_uri: 'https://ngi-oidc4vci-test.spruceid.xyz/jwks', + grant_types_supported: ['urn:ietf:params:oauth:grant-type:pre-authorized_code'], + credentials_supported: { + OpenBadgeCredential: { + formats: { + jwt_vc: { + types: ['VerifiableCredential', 'OpenBadgeCredential'], + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K'], + }, + ldp_vc: { + types: ['VerifiableCredential', 'OpenBadgeCredential'], + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['Ed25519Signature2018'], + }, + }, + }, + }, + }, + }, + auth: { + url: 'https://ngi-oidc4vci-test.spruceid.xyz/token', + method: 'POST', + request: { + client_id: 'sphereon:ssi-wallet', + grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code', + 'pre-authorized_code': + 'eyJhbGciOiJFUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdLCJleHAiOiIyMDIzLTA0LTE5VDExOjUzOjM4WiIsIm5vbmNlIjoiN3F4YldMcktpNTZjNjRlWjljaHJZeVUxbFVVQzMzV1YifQ.tDxAC8CsqN-DALOmY5ANEVf96fZfTzqHL4Aiq4IZzMJ-zSCrNkNBeuOK5D3RsJhSZcDMu2XvuG1RrSXJV0zHRg', + }, + response: { + access_token: + 'eyJhbGciOiJFUzI1NiJ9.eyJvcF9zdGF0ZSI6eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdfSwiaWF0IjoxNjgxOTA0OTUwLjAsImV4cCI6MTY4MTk5MTM1MC4wfQ.0CT_o2woWAQf_8mcPfC7uVtp_Cu8N4BLNOAgJGcQc-IcoS61QL2pArp7KdZGXGjqRmx9u4JjoVZuZHJSaDIyDg', + token_type: 'bearer', + expires_in: 84600, + }, + }, + credential: { + url: 'https://ngi-oidc4vci-test.spruceid.xyz/credential', + request: { + type: 'OpenBadgeCredential', + format: 'jwt_vc', + proof: { + proof_type: 'jwt', + jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlV6STFOa3NpTENKMWMyVWlPaUp6YVdjaUxDSnJkSGtpT2lKRlF5SXNJbU55ZGlJNkluTmxZM0F5TlRack1TSXNJbmdpT2lKclpuVmpTa0V0VEhKck9VWjBPRmx5TFVkMlQzSmpia3N3YjNkc2RqUlhNblUwU3pJeFNHZHZTVlIzSWl3aWVTSTZJalozY0ZCUE1rOUNRVXBTU0ZFMVRXdEtXVlJaV0dsQlJFUXdOMU5OTlV0amVXcDNYMkUzVUUxWmVGa2lmUSMwIn0.eyJhdWQiOiJodHRwczovL25naS1vaWRjNHZjaS10ZXN0LnNwcnVjZWlkLnh5eiIsImlhdCI6MTY4MTkxMTA2MC45NDIsImV4cCI6MTY4MTkxMTcyMC45NDIsImlzcyI6InNwaGVyZW9uOnNzaS13YWxsZXQiLCJqdGkiOiJhNjA4MzMxZi02ZmE0LTQ0ZjAtYWNkZWY5NmFjMjdmNmQ3MCJ9.NwF3_41gwnlIdd_6Uk9CczeQHzIQt6UcvTT5Cxv72j9S1v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IkpvYnMgZm9yIHRoZSBGdXR1cmUgKEpGRikiLCJpbWFnZSI6eyJpZCI6Imh0dHBzOi8vdzNjLWNjZy5naXRodWIuaW8vdmMtZWQvcGx1Z2Zlc3QtMi0yMDIyL2ltYWdlcy9KRkYtVkMtRURVLVBMVUdGRVNUMi1iYWRnZS1pbWFnZS5wbmciLCJ0eXBlIjoiSW1hZ2UifSwidHlwZSI6WyJQcm9maWxlIl0sInVybCI6Imh0dHBzOi8vd3d3LmpmZi5vcmcvIn0sImlzc3VhbmNlRGF0ZSI6IjIwMjMtMDQtMTlUMTM6MzE6NThaIiwiZXhwaXJhdGlvbkRhdGUiOiIyMDIzLTA0LTIwVDEzOjMxOjU4WiIsIm5hbWUiOiJKRkYgeCB2Yy1lZHUgUGx1Z0Zlc3QgMiBJbnRlcm9wZXJhYmlsaXR5In19.8GQEtIZGTApWBpyOC3dFX8heAo3nKxb6RXzZroM3YtLVIIzWP60adgXk5IYsgsHgvoVRq9UP9igJpycH4Rxa8w', + }, + }, + }, + walt: { + metadata: { + issuer: 'https://jff.walt.id/issuer-api/default/oidc/', + token_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/token', + credential_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/credential', + openid4vci_metadata: { + authorization_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/fulfillPAR', + token_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/token', + pushed_authorization_request_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/par', + issuer: 'https://jff.walt.id/issuer-api/default', + jwks_uri: 'https://jff.walt.id/issuer-api/default/oidc', + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'], + request_uri_parameter_supported: true, + credentials_supported: { + VerifiableId: { + display: [ + { + name: 'VerifiableId', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'VerifiableAttestation', 'VerifiableId'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'VerifiableAttestation', 'VerifiableId'], + }, + }, + }, + VerifiableDiploma: { + display: [ + { + name: 'VerifiableDiploma', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'VerifiableAttestation', 'VerifiableDiploma'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'VerifiableAttestation', 'VerifiableDiploma'], + }, + }, + }, + VerifiableVaccinationCertificate: { + display: [ + { + name: 'VerifiableVaccinationCertificate', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'VerifiableAttestation', 'VerifiableVaccinationCertificate'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'VerifiableAttestation', 'VerifiableVaccinationCertificate'], + }, + }, + }, + ProofOfResidence: { + display: [ + { + name: 'ProofOfResidence', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'VerifiableAttestation', 'ProofOfResidence'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'VerifiableAttestation', 'ProofOfResidence'], + }, + }, + }, + ParticipantCredential: { + display: [ + { + name: 'ParticipantCredential', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'ParticipantCredential'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'ParticipantCredential'], + }, + }, + }, + Europass: { + display: [ + { + name: 'Europass', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'VerifiableAttestation', 'Europass'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'VerifiableAttestation', 'Europass'], + }, + }, + }, + OpenBadgeCredential: { + display: [ + { + name: 'OpenBadgeCredential', + }, + ], + formats: { + ldp_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'RsaSignature2018', + 'JsonWebSignature2020', + 'JcsEd25519Signature2020', + ], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'ES256K', 'EdDSA', 'RS256', 'PS256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, + }, + }, + credential_issuer: { + display: [ + { + name: 'https://jff.walt.id/issuer-api/default', + }, + ], + }, + credential_endpoint: 'https://jff.walt.id/issuer-api/default/oidc/credential', + subject_types_supported: ['public'], + }, + }, + auth: { + url: 'https://jff.walt.id/issuer-api/default/oidc/token', + method: 'POST', + request: { + client_id: 'sphereon:ssi-wallet', + grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code', + 'pre-authorized_code': + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NzhkZWZjOS0wMTFlLTQ3ZTAtYmQ5YS03MWFlOGU4ZTJjYzYiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.uh1rX4qVqlp-YW-itLON8Zmov8t-xugCFDXlUSPuTSQ', + }, + response: { + access_token: '578defc9-011e-47e0-bd9a-71ae8e8e2cc6', + refresh_token: 'zx6cildNnkqLpdCoCVnr5d77OJ6m0ugl-0sVSoEb3go', + c_nonce: 'f06a3105-a2ed-44fc-954b-4a259703493b', + id_token: + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NzhkZWZjOS0wMTFlLTQ3ZTAtYmQ5YS03MWFlOGU4ZTJjYzYifQ.MlWL2L-YucfugV573GbGFI8UHiDrGQatlekpgPq5nBY', + token_type: 'Bearer', + expires_in: 300, + }, + }, + credential: { + url: 'https://jff.walt.id/issuer-api/default/oidc/credential', + request: { + type: 'OpenBadgeCredential', + format: 'jwt_vc', + proof: { + proof_type: 'jwt', + jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJ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BdWd1c3QtTm92ZW1iZXIgb2YgMjAyMiBjb2xsYWJvcmF0ZWQgdG8gcHVzaCBpbnRlcm9wZXJhYmlsaXR5IG9mIFZDcyBpbiBlZHVjYXRpb24gZm9yd2FyZC4iLCJ0eXBlIjoiQ3JpdGVyaWEifSwiZGVzY3JpcHRpb24iOiJUaGlzIHdhbGxldCBjYW4gZGlzcGxheSB0aGlzIE9wZW4gQmFkZ2UgMy4wIiwiaWQiOiIwIiwiaW1hZ2UiOnsiaWQiOiJodHRwczovL3czYy1jY2cuZ2l0aHViLmlvL3ZjLWVkL3BsdWdmZXN0LTItMjAyMi9pbWFnZXMvSkZGLVZDLUVEVS1QTFVHRkVTVDItYmFkZ2UtaW1hZ2UucG5nIiwidHlwZSI6IkltYWdlIn0sIm5hbWUiOiJPdXIgV2FsbGV0IFBhc3NlZCBKRkYgUGx1Z2Zlc3QgIzIgMjAyMiIsInR5cGUiOiJBY2hpZXZlbWVudCJ9LCJ0eXBlIjoiQWNoaWV2ZW1lbnRTdWJqZWN0In0sIm5hbWUiOiJBY2hpZXZlbWVudCBDcmVkZW50aWFsIn0sImp0aSI6InVybjp1dWlkOmM0YTA4MDYzLTc4ZTUtNDdkNS04NGY5LTg2YTFmNjNiYzNkYSJ9.AM-lAUjCjcuQgy1QhQXctd3YrUoC2UdXvOwDHcHsi_UuHX0nt__QrYlfcwUutc9gSsz-U9SZ1e6iAGarTNVbDQ', + format: 'jwt_vc', + }, + }, + }, + uniissuer: { + metadata: { + issuer: 'https://oidc4vc.uniissuer.io/', + token_endpoint: 'https://oidc4vc.uniissuer.io/1.0/token', + credential_endpoint: 'https: //oidc4vc.uniissuer.io/1.0/credential', + openid4vci_metadata: { + response_types_supported: ['code', 'token'], + credentials_supported: { + OpenBadgeCredential: { + display: [ + { + name: 'Open Badge V3', + locale: 'en-US', + logo: { + url: 'https: //uniissuer.io/images/logo.jpg', + }, + }, + ], + formats: { + ldp_vc: { + types: ['VerifiableCredential', 'OpenBadgeCredential'], + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'JsonWebSignature2020', + ], + }, + jwt_vc: { + types: ['VerifiableCredential', 'OpenBadgeCredential'], + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'EdDSA', 'ES256K', 'RS256', 'PS256'], + }, + }, + claims: { + achievement: { + mandatory: true, + value_type: 'object', + } as IssuerCredentialSubjectDisplay, + }, + }, + VaccinationCertificate: { + formats: { + ldp_vc: { + types: ['VerifiableCredential', 'VaccinationCertificate'], + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: [ + 'Ed25519Signature2018', + 'Ed25519Signature2020', + 'EcdsaSecp256k1Signature2019', + 'JsonWebSignature2020', + ], + }, + jwt_vc: { + types: ['VerifiableCredential', 'VaccinationCertificate'], + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256', 'EdDSA', 'ES256K', 'RS256', 'PS256'], + }, + }, + }, + }, + credential_issuer: { + display: [ + { + name: 'Danube Tech', + locale: 'en-US', + logo: { + url: 'https: //uniissuer.io/images/logo.jpg', + }, + }, + ], + }, + code_challenge_methods_supported: ['plain', 'S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'], + token_endpoint_auth_methods_supported: ['client_secret_post', 'client_secret_basic'], + issuer: 'https: //oidc4vc.uniissuer.io/', + authorization_endpoint: 'https://oidc4vc.uniissuer.io/1.0/authorize', + token_endpoint: 'https://oidc4vc.uniissuer.io/1.0/token', + credential_endpoint: 'https: //oidc4vc.uniissuer.io/1.0/credential', + }, + }, + auth: { + url: 'https://oidc4vc.uniissuer.io/1.0/token', + method: 'POST', + request: { + client_id: 'sphereon:ssi-wallet', + grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code', + 'pre-authorized_code': 'rQhxqvmEQef2pFChuedmDWlp6iIifUVI', + }, + response: { + access_token: + 'eyJraWQiOiJrZXlfMSIsInR5cCI6IkpXVCIsImFsZyI6IkVTMjU2SyJ9.eyJzdWIiOiJPcGVuV2FsbGV0IiwiYXVkIjoiT3BlbldhbGxldCIsIm5iZiI6MTY4MTkxMjg5NCwic2NvcGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiaXNzIjoiaHR0cHM6Ly91bmlpc3N1ZXIuaW8vIiwiZXhwIjoxNjgxOTEzMDc0LCJpYXQiOjE2ODE5MTI4OTQsIm5vbmNlIjoiMzhkMzZmM2ItNzJlMy00ODg2LWI2MGMtMzZiNzcwZDBlNGVhIiwianRpIjoiODkxMjhiODktNWZhMy00MjUwLTgyMGQtMGFkYzc3NjA1MWE5In0.xmR62cbZKQCQkp7aFp3LwLvTX1gV47GdB1hIxmflEZ7ShivnJx0W_bY5aGnEXmP-wSRGaC881zZKMJDDvN7frQ', + token_type: 'Bearer', + expires_in: 180, + c_nonce: '38d36f3b-72e3-4886-b60c-36b770d0e4ea', + c_nonce_expires_in: 180, + }, + }, + credential: { + url: 'https://oidc4vc.uniissuer.io/1.0/credential', + request: { + type: 'OpenBadgeCredential', + format: 'jwt_vc', + proof: { + proof_type: 'jwt', + jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlV6STFOa3NpTENKMWMyVWlPaUp6YVdjaUxDSnJkSGtpT2lKRlF5SXNJbU55ZGlJNkluTmxZM0F5TlRack1TSXNJbmdpT2lKclpuVmpTa0V0VEhKck9VWjBPRmx5TFVkMlQzSmpia3N3YjNkc2RqUlhNblUwU3pJeFNHZHZTVlIzSWl3aWVTSTZJalozY0ZCUE1rOUNRVXBTU0ZFMVRXdEtXVlJaV0dsQlJFUXdOMU5OTlV0amVXcDNYMkUzVUUxWmVGa2lmUSMwIn0.eyJhdWQiOiJodHRwczovL29pZGM0dmMudW5paXNzdWVyLmlvLyIsImlhdCI6MTY4MTkxMjgzNy40MTQsImV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ldmVtZW50U3ViamVjdCJ9fX0.MEQCIENGRXVx49P1gXnRUIzaLKUeZwA9fyQKIhShjeByQDkJAiA3W89GOGUG0K6ynx1A3kpCQr25mPQfGizzVnT08C2ltw', + }, + }, + }, + mattr: { + metadata: { + issuer: 'https://launchpad.mattrlabs.com', + token_endpoint: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token', + credential_endpoint: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential', + openid4vci_metadata: { + authorization_endpoint: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/authorize', + token_endpoint: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token', + jwks_uri: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/jwks', + token_endpoint_auth_methods_supported: ['none', 'client_secret_basic', 'client_secret_jwt', 'client_secret_post', 'private_key_jwt'], + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'], + response_modes_supported: ['form_post', 'fragment', 'query'], + response_types_supported: ['code id_token', 'code', 'id_token', 'none'], + scopes_supported: ['PermanentResidentCard', 'AcademicAward', 'LearnerProfile', 'OpenBadgeCredential'], + token_endpoint_auth_signing_alg_values_supported: ['HS256', 'RS256', 'PS256', 'ES256', 'EdDSA'], + credential_endpoint: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential', + credentials_supported: { + PermanentResidentCard: { + formats: { + ldp_vc: { + name: 'Permanent Resident Card', + description: 'Government of Kakapo PRC.', + types: ['PermanentResidentCard'], + binding_methods_supported: ['did'], + cryptographic_suites_supported: ['Ed25519Signature2018'], + } as CredentialSupportedBrief, + }, + }, + AcademicAward: { + formats: { + ldp_vc: { + name: 'Academic Award', + description: 'Microcredential from the MyCreds Network.', + types: ['AcademicAward'], + binding_methods_supported: ['did'], + cryptographic_suites_supported: ['Ed25519Signature2018'], + } as CredentialSupportedBrief, + }, + }, + LearnerProfile: { + formats: { + ldp_vc: { + name: 'Digitary Learner Profile', + description: 'Example', + types: ['LearnerProfile'], + binding_methods_supported: ['did'], + cryptographic_suites_supported: ['Ed25519Signature2018'], + } as CredentialSupportedBrief, + }, + }, + OpenBadgeCredential: { + formats: { + ldp_vc: { + name: 'JFF x vc-edu PlugFest 2', + description: "MATTR's submission for JFF Plugfest 2", + types: ['OpenBadgeCredential'], + binding_methods_supported: ['did'], + cryptographic_suites_supported: ['Ed25519Signature2018'], + } as CredentialSupportedBrief, + }, + }, + }, + }, + }, + auth: { + url: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token', + method: 'POST', + request: { + client_id: 'sphereon:ssi-wallet', + grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code', + 'pre-authorized_code': 'kI_19c0PtisCJBG-ngd9mA47UCKx4uoKglUp0gqmxKt', + }, + response: { + access_token: 'DYaZrXQ3lCgwdU7Te93N5q1OovKXnfPDWm9Rq7fC5Ws', + expires_in: 3600, + scope: 'OpenBadgeCredential', + token_type: 'Bearer', + }, + }, + credential: { + url: 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential', + request: { + type: 'OpenBadgeCredential', + format: 'ldp_vc', + proof: { + proof_type: 'jwt', + jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3AxM3N6QUFMVFN0cDV1OGtMcnl5YW5vYWtrVWtFUGZXazdvOHY3dms0RW1KI3o2TWtwMTNzekFBTFRTdHA1dThrTHJ5eWFub2Fra1VrRVBmV2s3bzh2N3ZrNEVtSiJ9.eyJhdWQiOiJodHRwczovL2xhdW5jaHBhZC5tYXR0cmxhYnMuY29tIiwiaWF0IjoxNjgxOTE0NDgyLjUxOSwiZXhwIjoxNjgxOTE1MTQyLjUxOSwiaXNzIjoic3BoZXJlb246c3NpLXdhbGxldCIsImp0aSI6ImI5NDY1ZGE5LTY4OGYtNDdjNi04MjUwNDA0ZGNiOWI5Y2E5In0.uQ8ewOfIjy_1p_Gk6PjeEWccBJnjOca1pwbTWiCAFMQX9wlIsfeUdGtXUoHjH5_PQtpwytodx7WU456_CT9iBQ', + }, + }, + response: { + format: 'w3cvc-jsonld', + credential: { + type: ['VerifiableCredential', 'VerifiableCredentialExtension', 'OpenBadgeCredential'], + issuer: { + id: 'did:web:launchpad.vii.electron.mattrlabs.io', + name: 'Jobs for the Future (JFF)', + iconUrl: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png', + image: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png', + }, + name: 'JFF x vc-edu PlugFest 2', + description: "MATTR's submission for JFF Plugfest 2", + credentialBranding: { + backgroundColor: '#464c49', + }, + issuanceDate: '2023-04-19T14:29:00.232Z', + credentialSubject: { + id: 'did:key:z6Mkp13szAALTStp5u8kLryyanoakkUkEPfWk7o8v7vk4EmJ', + type: ['AchievementSubject'], + achievement: { + id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922', + name: 'JFF x vc-edu PlugFest 2 Interoperability', + type: ['Achievement'], + image: { + id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png', + type: 'Image', + }, + criteria: { + type: 'Criteria', + narrative: + 'Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers.', + }, + description: + 'This credential solutionsupports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.', + }, + }, + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + { + '@vocab': 'https://w3id.org/security/undefinedTerm#', + }, + 'https://mattr.global/contexts/vc-extensions/v1', + 'https://purl.imsglobal.org/spec/ob/v3p0/context.json', + 'https://w3id.org/vc-revocation-list-2020/v1', + ], + credentialStatus: { + id: 'https://launchpad.vii.electron.mattrlabs.io/core/v1/revocation-lists/25ce0f22-975a-43f8-8936-b93983b3e8f0#39', + type: 'RevocationList2020Status', + revocationListIndex: '39', + revocationListCredential: 'https://launchpad.vii.electron.mattrlabs.io/core/v1/revocation-lists/25ce0f22-975a-43f8-8936-b93983b3e8f0', + } as ICredentialStatus, + proof: { + type: 'Ed25519Signature2018', + created: '2023-04-19T14:29:01Z', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..hz5x6dCdV4C0YmpEjJx8XzpwJdD78CnEkuhx5AxfNTZavAL3HnW1m4s8nQXgejYu_a6m79Fbbakm6PZ1yEd8CA', + proofPurpose: 'assertionMethod', + verificationMethod: 'did:web:launchpad.vii.electron.mattrlabs.io#6BhFMCGTJg', + }, + }, + }, + }, + }, + diwala: { + metadata: { + issuer: 'https://oidc4vc.diwala.io', + token_endpoint: 'https://oidc4vc.diwala.io/token', + credential_endpoint: 'https://oidc4vc.diwala.io/credential', + openid4vci_metadata: { + issuer: 'https://oidc4vc.diwala.io', + credential_endpoint: 'https://oidc4vc.diwala.io/credential', + token_endpoint: 'https://oidc4vc.diwala.io/token', + jwks_uri: 'https://oidc4vc.diwala.io/jwks', + grant_types_supported: ['urn:ietf:params:oauth:grant-type:pre-authorized_code'], + credentials_supported: { + OpenBadgeCredential: { + formats: { + ldp_vc: { + types: ['VerifiableCredential', 'OpenBadgeCredential'], + cryptographic_suites_supported: ['Ed25519Signature2018'], + cryptographic_binding_methods_supported: ['did'], + }, + }, + }, + }, + }, + }, + auth: { + url: 'https://oidc4vc.diwala.io/token', + method: 'POST', + request: { + client_id: 'sphereon:ssi-wallet', + grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code', + 'pre-authorized_code': + 'eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTE1NzI5fQ.JmhU1jhMfw3f_DaIqnxurPyIW1makcwUs49Fm253z5Q', + }, + response: { + access_token: + 'eyJhbGciOiJIUzI1NiJ9.eyJub25jZSI6ImJNV1JnODlRTjljeVkwbTBHWW9FaWQ1YVEwcGQzUlNCM2FFUGJnZWciLCJtc0lhdCI6MTY4MTkxNjk1MjEzOSwiaWF0IjoxNjgxOTE2OTUyLCJpc3MiOiJkaXdhbGEuaW8iLCJhdWQiOiJodHRwczovL29pZGM0dmMuZGl3YWxhLmlvIiwiZXhwIjoxNzEzNDcyNzUyfQ.ERukn43tgQ-elNSZAIHo7oXLnalzHDqVh7HcDQSy6sY', + token_type: 'bearer', + expires_in: 31555800, + }, + }, + credential: { + url: 'https://oidc4vc.diwala.io/credential', + request: { + type: 'OpenBadgeCredential', + format: 'ldp_vc', + proof: { + proof_type: 'jwt', + jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3AxM3N6QUFMVFN0cDV1OGtMcnl5YW5vYWtrVWtFUGZXazdvOHY3dms0RW1KI3o2TWtwMTNzekFBTFRTdHA1dThrTHJ5eWFub2Fra1VrRVBmV2s3bzh2N3ZrNEVtSiJ9.eyJhdWQiOiJodHRwczovL29pZGM0dmMuZGl3YWxhLmlvIiwiaWF0IjoxNjgxOTE1MDk1LjIwMiwiZXhwIjoxNjgxOTE1NzU1LjIwMiwiaXNzIjoic3BoZXJlb246c3NpLXdhbGxldCIsImp0aSI6IjYxN2MwM2EzLTM3MTUtNGJlMy1hYjkxNzM4MTlmYzYxNTYzIn0.KA-cHjecaYp9FSaWHkz5cqtNyhBIVT_0I7cJnpHn03T4UWFvdhjhn8Hpe-BU247enFyWOWJ6v3NQZyZgle7xBA', + }, + }, + response: { + credential: { + '@context': ['https://www.w3.org/2018/credentials/v1', 'https://purl.imsglobal.org/spec/ob/v3p0/context.json'], + id: 'urn:uuid:38beb3c1-611e-42b4-99b8-cf3e8b0fd9ae', + type: ['VerifiableCredential', 'OpenBadgeCredential'], + name: 'JFF x vc-edu PlugFest 2 Interoperability', + issuer: { + type: ['Profile'], + id: 'did:key:z6MkrzXCdarP1kaZcJb3pmNi295wfxerDrmTqPv5c6MkP2r9', + name: 'Jobs for the Future (JFF)', + url: 'https://www.jff.org/', + image: { + id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png', + type: 'Image', + }, + }, + issuanceDate: '2023-04-19T14:39:13Z', + credentialSubject: { + type: ['AchievementSubject'], + id: 'did:key:z6Mkp13szAALTStp5u8kLryyanoakkUkEPfWk7o8v7vk4EmJ', + achievement: { + id: 'urn:uuid:7e202d65-4286-4e7b-aa34-e018f05a5341', + type: ['Achievement'], + name: 'Diwala issued JFF x vc-edu PlugFest 2 Interoperability', + description: + 'This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.', + criteria: { + narrative: + 'Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers.', + }, + image: { + id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png', + type: 'Image', + }, + }, + }, + proof: { + type: 'Ed25519Signature2018', + created: '2023-04-19T14:39:13Z', + verificationMethod: 'did:key:z6MkrzXCdarP1kaZcJb3pmNi295wfxerDrmTqPv5c6MkP2r9#z6MkrzXCdarP1kaZcJb3pmNi295wfxerDrmTqPv5c6MkP2r9', + proofPurpose: 'assertionMethod', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..QDxjecY7YazXD6z3lsWeQ6DTGDw4KDWphzKFmkOo8DCr4ctGH7wB9ZW2EAz4qRv7s0g0O1-fXGIbAjPXfETKBw', + }, + }, + }, + }, + }, +}; diff --git a/packages/client/lib/__tests__/data/vci-payloads.json b/packages/client/lib/__tests__/data/vci-payloads.json new file mode 100644 index 00000000..098c8377 --- /dev/null +++ b/packages/client/lib/__tests__/data/vci-payloads.json @@ -0,0 +1,663 @@ +{ + "spruce": { + "metadata": { + "issuer": "https://ngi-oidc4vci-test.spruceid.xyz", + "token_endpoint": "https://ngi-oidc4vci-testspruceid.xyz/token", + "credential_endpoint": "https://ngi-oidc4vci-test.spruceid.xyz/credential", + "openid4vci_metadata": { + "issuer": "https://ngi-oidc4vci-test.spruceid.xyz", + "credential_endpoint": "https://ngi-oidc4vci-test.spruceid.xyz/credential", + "token_endpoint": "https://ngi-oidc4vci-test.spruceid.xyz/token", + "jwks_uri": "https://ngi-oidc4vci-test.spruceid.xyz/jwks", + "grant_types_supported": ["urn:ietf:params:oauth:grant-type:pre-authorized_code"], + "credentials_supported": { + "OpenBadgeCredential": { + "formats": { + "jwt_vc": { + "types": ["VerifiableCredential", "OpenBadgeCredential"], + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K"] + }, + "ldp_vc": { + "types": ["VerifiableCredential", "OpenBadgeCredential"], + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["Ed25519Signature2018"] + } + } + } + } + } + }, + "auth": { + "url": "https://ngi-oidc4vci-test.spruceid.xyz/token", + "method": "POST", + "request": { + "client_id": "sphereon:ssi-wallet", + "grant_type": "urn:ietf:params:oauth:grant-type:pre-authorized_code", + "pre-authorized_code": "eyJhbGciOiJFUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdLCJleHAiOiIyMDIzLTA0LTE5VDExOjUzOjM4WiIsIm5vbmNlIjoiN3F4YldMcktpNTZjNjRlWjljaHJZeVUxbFVVQzMzV1YifQ.tDxAC8CsqN-DALOmY5ANEVf96fZfTzqHL4Aiq4IZzMJ-zSCrNkNBeuOK5D3RsJhSZcDMu2XvuG1RrSXJV0zHRg" + }, + "response": { + "access_token": "eyJhbGciOiJFUzI1NiJ9.eyJvcF9zdGF0ZSI6eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdfSwiaWF0IjoxNjgxOTA0OTUwLjAsImV4cCI6MTY4MTk5MTM1MC4wfQ.0CT_o2woWAQf_8mcPfC7uVtp_Cu8N4BLNOAgJGcQc-IcoS61QL2pArp7KdZGXGjqRmx9u4JjoVZuZHJSaDIyDg", + "token_type": "bearer", + "expires_in": 84600 + } + }, + "credential": { + "url": "https://ngi-oidc4vci-test.spruceid.xyz/credential", + "request": { + "type": "OpenBadgeCredential", + "format": "jwt_vc", + "proof": { + "proof_type": "jwt", + "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlV6STFOa3NpTENKMWMyVWlPaUp6YVdjaUxDSnJkSGtpT2lKRlF5SXNJbU55ZGlJNkluTmxZM0F5TlRack1TSXNJbmdpT2lKclpuVmpTa0V0VEhKck9VWjBPRmx5TFVkMlQzSmpia3N3YjNkc2RqUlhNblUwU3pJeFNHZHZTVlIzSWl3aWVTSTZJalozY0ZCUE1rOUNRVXBTU0ZFMVRXdEtXVlJaV0dsQlJFUXdOMU5OTlV0amVXcDNYMkUzVUUxWmVGa2lmUSMwIn0.eyJhdWQiOiJodHRwczovL25naS1vaWRjNHZjaS10ZXN0LnNwcnVjZWlkLnh5eiIsImlhdCI6MTY4MTkxMTA2MC45NDIsImV4cCI6MTY4MTkxMTcyMC45NDIsImlzcyI6InNwaGVyZW9uOnNzaS13YWxsZXQiLCJqdGkiOiJhNjA4MzMxZi02ZmE0LTQ0ZjAtYWNkZWY5NmFjMjdmNmQ3MCJ9.NwF3_41gwnlIdd_6Uk9CczeQHzIQt6UcvTT5Cxv72j9S1vNwiY9annA2kLsjsTiR5-WMBdUhJCO7wYCtZ15mxw" + } + }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SI6eyJpZCI6Imh0dHBzOi8vdzNjLWNjZy5naXRodWIuaW8vdmMtZWQvcGx1Z2Zlc3QtMi0yMDIyL2ltYWdlcy9KRkYtVkMtRURVLVBMVUdGRVNUMi1iYWRnZS1pbWFnZS5wbmciLCJ0eXBlIjoiSW1hZ2UifSwidHlwZSI6WyJQcm9maWxlIl0sInVybCI6Imh0dHBzOi8vd3d3LmpmZi5vcmcvIn0sImlzc3VhbmNlRGF0ZSI6IjIwMjMtMDQtMTlUMTM6MzE6NThaIiwiZXhwaXJhdGlvbkRhdGUiOiIyMDIzLTA0LTIwVDEzOjMxOjU4WiIsIm5hbWUiOiJKRkYgeCB2Yy1lZHUgUGx1Z0Zlc3QgMiBJbnRlcm9wZXJhYmlsaXR5In19.8GQEtIZGTApWBpyOC3dFX8heAo3nKxb6RXzZroM3YtLVIIzWP60adgXk5IYsgsHgvoVRq9UP9igJpycH4Rxa8w" + } + } + }, + "walt": { + "metadata": { + "issuer": "https://jff.walt.id/issuer-api/default/oidc/", + "token_endpoint": "https://jff.walt.id/issuer-api/default/oidc/token", + "credential_endpoint": "https://jff.walt.id/issuer-api/default/oidc/credential", + "openid4vci_metadata": { + "authorization_endpoint": "https://jff.walt.id/issuer-api/default/oidc/fulfillPAR", + "token_endpoint": "https://jff.walt.id/issuer-api/default/oidc/token", + "pushed_authorization_request_endpoint": "https://jff.walt.id/issuer-api/default/oidc/par", + "issuer": "https://jff.walt.id/issuer-api/default", + "jwks_uri": "https://jff.walt.id/issuer-api/default/oidc", + "grant_types_supported": ["authorization_code", "urn:ietf:params:oauth:grant-type:pre-authorized_code"], + "request_uri_parameter_supported": true, + "credentials_supported": { + "VerifiableId": { + "display": [ + { + "name": "VerifiableId" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "VerifiableAttestation", "VerifiableId"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "VerifiableAttestation", "VerifiableId"] + } + } + }, + "VerifiableDiploma": { + "display": [ + { + "name": "VerifiableDiploma" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "VerifiableAttestation", "VerifiableDiploma"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "VerifiableAttestation", "VerifiableDiploma"] + } + } + }, + "VerifiableVaccinationCertificate": { + "display": [ + { + "name": "VerifiableVaccinationCertificate" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "VerifiableAttestation", "VerifiableVaccinationCertificate"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "VerifiableAttestation", "VerifiableVaccinationCertificate"] + } + } + }, + "ProofOfResidence": { + "display": [ + { + "name": "ProofOfResidence" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "VerifiableAttestation", "ProofOfResidence"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "VerifiableAttestation", "ProofOfResidence"] + } + } + }, + "ParticipantCredential": { + "display": [ + { + "name": "ParticipantCredential" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "ParticipantCredential"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "ParticipantCredential"] + } + } + }, + "Europass": { + "display": [ + { + "name": "Europass" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "VerifiableAttestation", "Europass"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "VerifiableAttestation", "Europass"] + } + } + }, + "OpenBadgeCredential": { + "display": [ + { + "name": "OpenBadgeCredential" + } + ], + "formats": { + "ldp_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "RsaSignature2018", + "JsonWebSignature2020", + "JcsEd25519Signature2020" + ], + "types": ["VerifiableCredential", "OpenBadgeCredential"] + }, + "jwt_vc": { + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "ES256K", "EdDSA", "RS256", "PS256"], + "types": ["VerifiableCredential", "OpenBadgeCredential"] + } + } + } + }, + "credential_issuer": { + "display": [ + { + "locale": null, + "name": "https://jff.walt.id/issuer-api/default" + } + ] + }, + "credential_endpoint": "https://jff.walt.id/issuer-api/default/oidc/credential", + "subject_types_supported": ["public"] + } + }, + "auth": { + "url": "https://jff.walt.id/issuer-api/default/oidc/token", + "method": "POST", + "request": { + "client_id": "sphereon:ssi-wallet", + "grant_type": "urn:ietf:params:oauth:grant-type:pre-authorized_code", + "pre-authorized_code": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NzhkZWZjOS0wMTFlLTQ3ZTAtYmQ5YS03MWFlOGU4ZTJjYzYiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.uh1rX4qVqlp-YW-itLON8Zmov8t-xugCFDXlUSPuTSQ" + }, + "response": { + "access_token": "578defc9-011e-47e0-bd9a-71ae8e8e2cc6", + "refresh_token": "zx6cildNnkqLpdCoCVnr5d77OJ6m0ugl-0sVSoEb3go", + "c_nonce": "f06a3105-a2ed-44fc-954b-4a259703493b", + "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NzhkZWZjOS0wMTFlLTQ3ZTAtYmQ5YS03MWFlOGU4ZTJjYzYifQ.MlWL2L-YucfugV573GbGFI8UHiDrGQatlekpgPq5nBY", + "token_type": "Bearer", + "expires_in": 300 + } + }, + "credential": { + "url": "https://jff.walt.id/issuer-api/default/oidc/credential", + "request": { + "type": "OpenBadgeCredential", + "format": "jwt_vc", + "proof": { + "proof_type": "jwt", + "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlV6STFOa3NpTENKMWMyVWlPaUp6YVdjaUxDSnJkSGtpT2lKRlF5SXNJbU55ZGlJNkluTmxZM0F5TlRack1TSXNJbmdpT2lKclpuVmpTa0V0VEhKck9VWjBPRmx5TFVkMlQzSmpia3N3YjNkc2RqUlhNblUwU3pJeFNHZHZTVlIzSWl3aWVTSTZJalozY0ZCUE1rOUNRVXBTU0ZFMVRXdEtXVlJaV0dsQlJFUXdOMU5OTlV0amVXcDNYMkUzVUUxWmVGa2lmUSMwIn0.eyJhdWQiOiJodHRwczovL2pmZi53YWx0LmlkL2lzc3Vlci1hcGkvZGVmYXVsdC9vaWRjLyIsImlhdCI6MTY4MTkxMTk0Mi4yMzgsImV4cCI6MTY4MTkxMjYwMi4yMzgsIm5vbmNlIjoiZjA2YTMxMDUtYTJlZC00NGZjLTk1NGItNGEyNTk3MDM0OTNiIiwiaXNzIjoic3BoZXJlb246c3NpLXdhbGxldCIsImp0aSI6IjA1OWM3ODA5LTlmOGYtNGE3ZS1hZDI4YTNhMTNhMGIzNmViIn0.RfiWyybxpe3nkx3b0yIsqDHQtvB1WwhDW4t0X-kijy2dsSfv2cYhSEmAzs1shg7OV4EW8fSzt_Te79xiVl6jCw" + } + }, + "response": { + "acceptance_token": null, + "c_nonce": null, + "c_nonce_expires_in": null, + "credential": "eyJraWQiOiJkaWQ6andrOmV5SnJkSGtpT2lKUFMxQWlMQ0oxYzJVaU9pSnphV2NpTENKamNuWWlPaUpGWkRJMU5URTVJaXdpYTJsa0lqb2lOMlEyWTJKbU1qUTRPV0l6TkRJM05tSXhOekl4T1RBMU5EbGtNak01TVRnaUxDSjRJam9pUm01RlZWVmhkV1J0T1RsT016QmlPREJxY3poV2REUkJiazk0ZGxKM1dIUm5VbU5MY1ROblFrbDFPQ0lzSW1Gc1p5STZJa1ZrUkZOQkluMCMwIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ.eyJpc3MiOiJkaWQ6andrOmV5SnJkSGtpT2lKUFMxQWlMQ0oxYzJVaU9pSnphV2NpTENKamNuWWlPa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2xsYWJvcmF0ZWQgdG8gcHVzaCBpbnRlcm9wZXJhYmlsaXR5IG9mIFZDcyBpbiBlZHVjYXRpb24gZm9yd2FyZC4iLCJ0eXBlIjoiQ3JpdGVyaWEifSwiZGVzY3JpcHRpb24iOiJUaGlzIHdhbGxldCBjYW4gZGlzcGxheSB0aGlzIE9wZW4gQmFkZ2UgMy4wIiwiaWQiOiIwIiwiaW1hZ2UiOnsiaWQiOiJodHRwczovL3czYy1jY2cuZ2l0aHViLmlvL3ZjLWVkL3BsdWdmZXN0LTItMjAyMi9pbWFnZXMvSkZGLVZDLUVEVS1QTFVHRkVTVDItYmFkZ2UtaW1hZ2UucG5nIiwidHlwZSI6IkltYWdlIn0sIm5hbWUiOiJPdXIgV2FsbGV0IFBhc3NlZCBKRkYgUGx1Z2Zlc3QgIzIgMjAyMiIsInR5cGUiOiJBY2hpZXZlbWVudCJ9LCJ0eXBlIjoiQWNoaWV2ZW1lbnRTdWJqZWN0In0sIm5hbWUiOiJBY2hpZXZlbWVudCBDcmVkZW50aWFsIn0sImp0aSI6InVybjp1dWlkOmM0YTA4MDYzLTc4ZTUtNDdkNS04NGY5LTg2YTFmNjNiYzNkYSJ9.AM-lAUjCjcuQgy1QhQXctd3YrUoC2UdXvOwDHcHsi_UuHX0nt__QrYlfcwUutc9gSsz-U9SZ1e6iAGarTNVbDQ", + "format": "jwt_vc" + } + } + }, + "uniissuer": { + "metadata": { + "issuer": "https://oidc4vc.uniissuer.io/", + "token_endpoint": "https://oidc4vc.uniissuer.io/1.0/token", + "credential_endpoint": "https: //oidc4vc.uniissuer.io/1.0/credential", + "openid4vci_metadata": { + "response_types_supported": ["code", "token"], + "credentials_supported": { + "OpenBadgeCredential": { + "display": [ + { + "name": "Open Badge V3", + "locale": "en-US", + "logo": { + "url": "https: //uniissuer.io/images/logo.jpg" + } + } + ], + "formats": { + "ldp_vc": { + "types": ["VerifiableCredential", "OpenBadgeCredential"], + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "JsonWebSignature2020" + ] + }, + "jwt_vc": { + "types": ["VerifiableCredential", "OpenBadgeCredential"], + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "EdDSA", "ES256K", "RS256", "PS256"] + } + }, + "claims": { + "achievement": { + "mandatory": true, + "value_type": "object" + } + } + }, + "VaccinationCertificate": { + "formats": { + "ldp_vc": { + "types": ["VerifiableCredential", "VaccinationCertificate"], + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": [ + "Ed25519Signature2018", + "Ed25519Signature2020", + "EcdsaSecp256k1Signature2019", + "JsonWebSignature2020" + ] + }, + "jwt_vc": { + "types": ["VerifiableCredential", "VaccinationCertificate"], + "cryptographic_binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["ES256", "EdDSA", "ES256K", "RS256", "PS256"] + } + } + } + }, + "credential_issuer": { + "display": [ + { + "name": "Danube Tech", + "locale": "en-US", + "logo": { + "url": "https: //uniissuer.io/images/logo.jpg" + } + } + ] + }, + "code_challenge_methods_supported": ["plain", "S256"], + "grant_types_supported": ["authorization_code", "urn:ietf:params:oauth:grant-type:pre-authorized_code"], + "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"], + "issuer": "https: //oidc4vc.uniissuer.io/", + "authorization_endpoint": "https://oidc4vc.uniissuer.io/1.0/authorize", + "token_endpoint": "https://oidc4vc.uniissuer.io/1.0/token", + "credential_endpoint": "https: //oidc4vc.uniissuer.io/1.0/credential" + } + }, + "auth": { + "url": "https://oidc4vc.uniissuer.io/1.0/token", + "method": "POST", + "request": { + "client_id": "sphereon:ssi-wallet", + "grant_type": "urn:ietf:params:oauth:grant-type:pre-authorized_code", + "pre-authorized_code": "rQhxqvmEQef2pFChuedmDWlp6iIifUVI" + }, + "response": { + "access_token": "eyJraWQiOiJrZXlfMSIsInR5cCI6IkpXVCIsImFsZyI6IkVTMjU2SyJ9.eyJzdWIiOiJPcGVuV2FsbGV0IiwiYXVkIjoiT3BlbldhbGxldCIsIm5iZiI6MTY4MTkxMjg5NCwic2NvcGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiaXNzIjoiaHR0cHM6Ly91bmlpc3N1ZXIuaW8vIiwiZXhwIjoxNjgxOTEzMDc0LCJpYXQiOjE2ODE5MTI4OTQsIm5vbmNlIjoiMzhkMzZmM2ItNzJlMy00ODg2LWI2MGMtMzZiNzcwZDBlNGVhIiwianRpIjoiODkxMjhiODktNWZhMy00MjUwLTgyMGQtMGFkYzc3NjA1MWE5In0.xmR62cbZKQCQkp7aFp3LwLvTX1gV47GdB1hIxmflEZ7ShivnJx0W_bY5aGnEXmP-wSRGaC881zZKMJDDvN7frQ", + "token_type": "Bearer", + "expires_in": 180, + "c_nonce": "38d36f3b-72e3-4886-b60c-36b770d0e4ea", + "c_nonce_expires_in": 180 + } + }, + "credential": { + "url": "https://oidc4vc.uniissuer.io/1.0/credential", + "request": { + "type": "OpenBadgeCredential", + "format": "jwt_vc", + "proof": { + "proof_type": "jwt", + "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6andrOmV5SmhiR2NpT2lKRlV6STFOa3NpTENKMWMyVWlPaUp6YVdjaUxDSnJkSGtpT2lKRlF5SXNJbU55ZGlJNkluTmxZM0F5TlRack1TSXNJbmdpT2lKclpuVmpTa0V0VEhKck9VWjBPRmx5TFVkMlQzSmpia3N3YjNkc2RqUlhNblUwU3pJeFNHZHZTVlIzSWl3aWVTSTZJalozY0ZCUE1rOUNRVXBTU0ZFMVRXdEtXVlJaV0dsQlJFUXdOMU5OTlV0amVXcDNYMkUzVUUxWmVGa2lmUSMwIn0.eyJhdWQiOiJodHRwczovL29pZGM0dmMudW5paXNzdWVyLmlvLyIsImlhdCI6MTY4MTkxMjgzNy40MTQsImV4cCI6MTY4MTkxMzQ5Ny40MTQsIm5vbmNlIjoiMzhkMzZmM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eZwA9fyQKIhShjeByQDkJAiA3W89GOGUG0K6ynx1A3kpCQr25mPQfGizzVnT08C2ltw" + } + } + }, + "mattr": { + "metadata": { + "issuer": "https://launchpad.mattrlabs.com", + "token_endpoint": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token", + "credential_endpoint": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential", + "openid4vci_metadata": { + "authorization_endpoint": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/authorize", + "token_endpoint": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token", + "jwks_uri": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/jwks", + "token_endpoint_auth_methods_supported": ["none", "client_secret_basic", "client_secret_jwt", "client_secret_post", "private_key_jwt"], + "code_challenge_methods_supported": ["S256"], + "grant_types_supported": ["authorization_code", "urn:ietf:params:oauth:grant-type:pre-authorized_code"], + "response_modes_supported": ["form_post", "fragment", "query"], + "response_types_supported": ["code id_token", "code", "id_token", "none"], + "scopes_supported": ["PermanentResidentCard", "AcademicAward", "LearnerProfile", "OpenBadgeCredential"], + "token_endpoint_auth_signing_alg_values_supported": ["HS256", "RS256", "PS256", "ES256", "EdDSA"], + "credential_endpoint": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential", + "credentials_supported": { + "PermanentResidentCard": { + "formats": { + "ldp_vc": { + "name": "Permanent Resident Card", + "description": "Government of Kakapo PRC.", + "types": ["PermanentResidentCard"], + "binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["Ed25519Signature2018"] + } + } + }, + "AcademicAward": { + "formats": { + "ldp_vc": { + "name": "Academic Award", + "description": "Microcredential from the MyCreds Network.", + "types": ["AcademicAward"], + "binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["Ed25519Signature2018"] + } + } + }, + "LearnerProfile": { + "formats": { + "ldp_vc": { + "name": "Digitary Learner Profile", + "description": "Example", + "types": ["LearnerProfile"], + "binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["Ed25519Signature2018"] + } + } + }, + "OpenBadgeCredential": { + "formats": { + "ldp_vc": { + "name": "JFF x vc-edu PlugFest 2", + "description": "MATTR's submission for JFF Plugfest 2", + "types": ["OpenBadgeCredential"], + "binding_methods_supported": ["did"], + "cryptographic_suites_supported": ["Ed25519Signature2018"] + } + } + } + } + } + }, + "auth": { + "url": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token", + "method": "POST", + "request": { + "client_id": "sphereon:ssi-wallet", + "grant_type": "urn:ietf:params:oauth:grant-type:pre-authorized_code", + "pre-authorized_code": "kI_19c0PtisCJBG-ngd9mA47UCKx4uoKglUp0gqmxKt" + }, + "response": { + "access_token": "DYaZrXQ3lCgwdU7Te93N5q1OovKXnfPDWm9Rq7fC5Ws", + "expires_in": 3600, + "scope": "OpenBadgeCredential", + "token_type": "Bearer" + } + }, + "credential": { + "url": "https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential", + "request": { + "type": "OpenBadgeCredential", + "format": "ldp_vc", + "proof": { + "proof_type": "jwt", + "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3AxM3N6QUFMVFN0cDV1OGtMcnl5YW5vYWtrVWtFUGZXazdvOHY3dms0RW1KI3o2TWtwMTNzekFBTFRTdHA1dThrTHJ5eWFub2Fra1VrRVBmV2s3bzh2N3ZrNEVtSiJ9.eyJhdWQiOiJodHRwczovL2xhdW5jaHBhZC5tYXR0cmxhYnMuY29tIiwiaWF0IjoxNjgxOTE0NDgyLjUxOSwiZXhwIjoxNjgxOTE1MTQyLjUxOSwiaXNzIjoic3BoZXJlb246c3NpLXdhbGxldCIsImp0aSI6ImI5NDY1ZGE5LTY4OGYtNDdjNi04MjUwNDA0ZGNiOWI5Y2E5In0.uQ8ewOfIjy_1p_Gk6PjeEWccBJnjOca1pwbTWiCAFMQX9wlIsfeUdGtXUoHjH5_PQtpwytodx7WU456_CT9iBQ" + } + }, + "response": { + "format": "w3cvc-jsonld", + "credential": { + "type": ["VerifiableCredential", "VerifiableCredentialExtension", "OpenBadgeCredential"], + "issuer": { + "id": "did:web:launchpad.vii.electron.mattrlabs.io", + "name": "Jobs for the Future (JFF)", + "iconUrl": "https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png", + "image": "https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png" + }, + "name": "JFF x vc-edu PlugFest 2", + "description": "MATTR's submission for JFF Plugfest 2", + "credentialBranding": { + "backgroundColor": "#464c49" + }, + "issuanceDate": "2023-04-19T14:29:00.232Z", + "credentialSubject": { + "id": "did:key:z6Mkp13szAALTStp5u8kLryyanoakkUkEPfWk7o8v7vk4EmJ", + "type": ["AchievementSubject"], + "achievement": { + "id": "urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922", + "name": "JFF x vc-edu PlugFest 2 Interoperability", + "type": ["Achievement"], + "image": { + "id": "https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png", + "type": "Image" + }, + "criteria": { + "type": "Criteria", + "narrative": "Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers." + }, + "description": "This credential solutionsupports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2." + } + }, + "@context": [ + "https://www.w3.org/2018/credentials/v1", + { + "@vocab": "https://w3id.org/security/undefinedTerm#" + }, + "https://mattr.global/contexts/vc-extensions/v1", + "https://purl.imsglobal.org/spec/ob/v3p0/context.json", + "https://w3id.org/vc-revocation-list-2020/v1" + ], + "credentialStatus": { + "id": "https://launchpad.vii.electron.mattrlabs.io/core/v1/revocation-lists/25ce0f22-975a-43f8-8936-b93983b3e8f0#39", + "type": "RevocationList2020Status", + "revocationListIndex": "39", + "revocationListCredential": "https://launchpad.vii.electron.mattrlabs.io/core/v1/revocation-lists/25ce0f22-975a-43f8-8936-b93983b3e8f0" + }, + "proof": { + "type": "Ed25519Signature2018", + "created": "2023-04-19T14:29:01Z", + "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..hz5x6dCdV4C0YmpEjJx8XzpwJdD78CnEkuhx5AxfNTZavAL3HnW1m4s8nQXgejYu_a6m79Fbbakm6PZ1yEd8CA", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:web:launchpad.vii.electron.mattrlabs.io#6BhFMCGTJg" + } + } + } + } + }, + "diwala": { + "metadata": { + "issuer": "https://oidc4vc.diwala.io", + "token_endpoint": "https://oidc4vc.diwala.io/token", + "credential_endpoint": "https://oidc4vc.diwala.io/credential", + "openid4vci_metadata": { + "issuer": "https://oidc4vc.diwala.io", + "credential_endpoint": "https://oidc4vc.diwala.io/credential", + "token_endpoint": "https://oidc4vc.diwala.io/token", + "jwks_uri": "https://oidc4vc.diwala.io/jwks", + "grant_types_supported": ["urn:ietf:params:oauth:grant-type:pre-authorized_code"], + "credentials_supported": { + "OpenBadgeCredential": { + "formats": { + "ldp_vc": { + "types": ["VerifiableCredential", "OpenBadgeCredential"], + "cryptographic_suites_supported": ["Ed25519Signature2018"], + "cryptographic_binding_methods_supported": ["did"] + } + } + } + } + } + }, + "auth": { + "url": "https://oidc4vc.diwala.io/token", + "method": "POST", + "request": { + "client_id": "sphereon:ssi-wallet", + "grant_type": "urn:ietf:params:oauth:grant-type:pre-authorized_code", + "pre-authorized_code": "eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTE1NzI5fQ.JmhU1jhMfw3f_DaIqnxurPyIW1makcwUs49Fm253z5Q" + }, + "response": { + "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJub25jZSI6ImJNV1JnODlRTjljeVkwbTBHWW9FaWQ1YVEwcGQzUlNCM2FFUGJnZWciLCJtc0lhdCI6MTY4MTkxNjk1MjEzOSwiaWF0IjoxNjgxOTE2OTUyLCJpc3MiOiJkaXdhbGEuaW8iLCJhdWQiOiJodHRwczovL29pZGM0dmMuZGl3YWxhLmlvIiwiZXhwIjoxNzEzNDcyNzUyfQ.ERukn43tgQ-elNSZAIHo7oXLnalzHDqVh7HcDQSy6sY", + "token_type": "bearer", + "expires_in": 31555800 + } + }, + "credential": { + "url": "https://oidc4vc.diwala.io/credential", + "request": { + "type": "OpenBadgeCredential", + "format": "ldp_vc", + "proof": { + "proof_type": "jwt", + "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa3AxM3N6QUFMVFN0cDV1OGtMcnl5YW5vYWtrVWtFUGZXazdvOHY3dms0RW1KI3o2TWtwMTNzekFBTFRTdHA1dThrTHJ5eWFub2Fra1VrRVBmV2s3bzh2N3ZrNEVtSiJ9.eyJhdWQiOiJodHRwczovL29pZGM0dmMuZGl3YWxhLmlvIiwiaWF0IjoxNjgxOTE1MDk1LjIwMiwiZXhwIjoxNjgxOTE1NzU1LjIwMiwiaXNzIjoic3BoZXJlb246c3NpLXdhbGxldCIsImp0aSI6IjYxN2MwM2EzLTM3MTUtNGJlMy1hYjkxNzM4MTlmYzYxNTYzIn0.KA-cHjecaYp9FSaWHkz5cqtNyhBIVT_0I7cJnpHn03T4UWFvdhjhn8Hpe-BU247enFyWOWJ6v3NQZyZgle7xBA" + } + }, + "response": { + "credential": { + "@context": ["https://www.w3.org/2018/credentials/v1", "https://purl.imsglobal.org/spec/ob/v3p0/context.json"], + "id": "urn:uuid:38beb3c1-611e-42b4-99b8-cf3e8b0fd9ae", + "type": ["VerifiableCredential", "OpenBadgeCredential"], + "name": "JFF x vc-edu PlugFest 2 Interoperability", + "issuer": { + "type": ["Profile"], + "id": "did:key:z6MkrzXCdarP1kaZcJb3pmNi295wfxerDrmTqPv5c6MkP2r9", + "name": "Jobs for the Future (JFF)", + "url": "https://www.jff.org/", + "image": { + "id": "https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png", + "type": "Image" + } + }, + "issuanceDate": "2023-04-19T14:39:13Z", + "credentialSubject": { + "type": ["AchievementSubject"], + "id": "did:key:z6Mkp13szAALTStp5u8kLryyanoakkUkEPfWk7o8v7vk4EmJ", + "achievement": { + "id": "urn:uuid:7e202d65-4286-4e7b-aa34-e018f05a5341", + "type": ["Achievement"], + "name": "Diwala issued JFF x vc-edu PlugFest 2 Interoperability", + "description": "This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.", + "criteria": { + "narrative": "Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers." + }, + "image": { + "id": "https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png", + "type": "Image" + } + } + }, + "proof": { + "type": "Ed25519Signature2018", + "created": "2023-04-19T14:39:13Z", + "verificationMethod": "did:key:z6MkrzXCdarP1kaZcJb3pmNi295wfxerDrmTqPv5c6MkP2r9#z6MkrzXCdarP1kaZcJb3pmNi295wfxerDrmTqPv5c6MkP2r9", + "proofPurpose": "assertionMethod", + "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..QDxjecY7YazXD6z3lsWeQ6DTGDw4KDWphzKFmkOo8DCr4ctGH7wB9ZW2EAz4qRv7s0g0O1-fXGIbAjPXfETKBw" + } + } + } + } + } +} diff --git a/packages/common/lib/types/Generic.types.ts b/packages/common/lib/types/Generic.types.ts index 182a6ac7..915d7001 100644 --- a/packages/common/lib/types/Generic.types.ts +++ b/packages/common/lib/types/Generic.types.ts @@ -43,6 +43,7 @@ export interface IssuerMetadata { } export interface CredentialSupportedBrief { + name?: string; types: string[]; // REQUIRED. JSON array designating the types a certain credential type supports cryptographic_binding_methods_supported?: string[]; // OPTIONAL. Array of case sensitive strings that identify how the Credential is bound to the identifier of the End-User who possesses the Credential cryptographic_suites_supported?: string[]; // OPTIONAL. Array of case sensitive strings that identify the cryptographic suites that are supported for the cryptographic_binding_methods_supported diff --git a/packages/common/lib/types/index.ts b/packages/common/lib/types/index.ts index 5a96a998..ed1e9a23 100644 --- a/packages/common/lib/types/index.ts +++ b/packages/common/lib/types/index.ts @@ -1,6 +1,7 @@ export * from './Authorization.types'; export * from './CredentialIssuance.types'; export * from './Generic.types'; +export * from './v1_0_08.types'; export * from './v1_0_09.types'; export * from './v1_0_11.types'; export * from './OAuth2ASMetadata'; diff --git a/packages/common/lib/types/v1_0_08.types.ts b/packages/common/lib/types/v1_0_08.types.ts index 98346546..bd70f84e 100644 --- a/packages/common/lib/types/v1_0_08.types.ts +++ b/packages/common/lib/types/v1_0_08.types.ts @@ -1,11 +1,15 @@ import { CredentialSupportedBrief, Display, IssuerCredentialSubject } from './Generic.types'; export interface IssuerMetadataV1_0_08 { + issuer?: string; credential_endpoint: string; credentials_supported: CredentialSupportedTypeV1_0_08; - credential_issuer: string; + credential_issuer?: { + display: Display | Display[]; + }; authorization_server?: string; token_endpoint?: string; display?: Display[]; + [x: string]: unknown; } export interface CredentialSupportedTypeV1_0_08 { @@ -17,5 +21,5 @@ export interface CredentialSupportedV1_0_08 { formats: { [credentialFormat: string]: CredentialSupportedBrief; }; - claims: IssuerCredentialSubject; + claims?: IssuerCredentialSubject; }