Skip to content

Commit

Permalink
Merge pull request #294 from Sphereon-Opensource/fix/contact-connection
Browse files Browse the repository at this point in the history
chore: contact connection for identifierType === URL
  • Loading branch information
sanderPostma authored Dec 6, 2024
2 parents 9e92b48 + 1495bfd commit 75fa82a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/oid4vci-holder/src/agent/OID4VCIHolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -725,6 +726,20 @@ export class OID4VCIHolder implements IAgentPlugin {
type: identifierType,
correlationId,
},
...(identifierType === CorrelationIdentifierType.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, {
Expand Down

0 comments on commit 75fa82a

Please sign in to comment.