From 8deddbc1a3b89c44fcee70eb1473ffedb76f0dde Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Fri, 6 Dec 2024 16:54:16 +0100 Subject: [PATCH 1/2] chore: contact connection for identifierType === URL --- packages/oid4vci-holder/src/agent/OID4VCIHolder.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts b/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts index 2402768b..3c34a3eb 100644 --- a/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts +++ b/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts @@ -725,6 +725,20 @@ export class OID4VCIHolder implements IAgentPlugin { type: identifierType, correlationId, }, + ...(identifierType === URL && { + connection: { + type: ConnectionType.OPENID_CONNECT, + config: { + clientId: '138d7bf8-c930-4c6e-b928-97d3a4928b01', + clientSecret: '03b3955f-d020-4f2a-8a27-4e452d4e27a0', + scopes: ['auth'], + issuer: 'https://example.com/app-test', + redirectUrl: 'app:/callback', + dangerouslyAllowInsecureHttpRequests: true, + clientAuthMethod: 'post' as const, + }, + }, + }), } await context.agent.emit(OID4VCIHolderEvent.CONTACT_IDENTITY_CREATED, { From 1495bfd6b4b8dca5d9136fb1d0b5d97c7a305918 Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Fri, 6 Dec 2024 16:58:06 +0100 Subject: [PATCH 2/2] chore: contact connection for identifierType === URL --- packages/oid4vci-holder/src/agent/OID4VCIHolder.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts b/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts index 3c34a3eb..b458ff13 100644 --- a/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts +++ b/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts @@ -29,6 +29,7 @@ import { import { IJwtService, JwsHeader } from '@sphereon/ssi-sdk-ext.jwt-service' import { signatureAlgorithmFromKey } from '@sphereon/ssi-sdk-ext.key-utils' import { + ConnectionType, CorrelationIdentifierType, CredentialCorrelationType, CredentialRole, @@ -725,7 +726,7 @@ export class OID4VCIHolder implements IAgentPlugin { type: identifierType, correlationId, }, - ...(identifierType === URL && { + ...(identifierType === CorrelationIdentifierType.URL && { connection: { type: ConnectionType.OPENID_CONNECT, config: {