11import { KeyObject } from 'crypto'
22
33import { uuidv4 } from '@sphereon/oid4vc-common'
4- import {
5- CredentialRequestClientBuilder ,
6- CredentialRequestClientBuilderV1_0_15 ,
7- ProofOfPossessionBuilder
8- } from '@sphereon/oid4vci-client'
4+ import { CredentialRequestClientBuilderV1_0_15 , ProofOfPossessionBuilder } from '@sphereon/oid4vci-client'
95import {
106 Alg ,
117 CNonceState ,
@@ -21,7 +17,6 @@ import {
2117} from '@sphereon/oid4vci-common'
2218import {
2319 AuthorizationServerMetadataBuilder ,
24- CredentialDataSupplierResult ,
2520 CredentialSupportedBuilderV1_15 ,
2621 MemoryStates ,
2722 VcIssuer ,
@@ -172,7 +167,7 @@ describe('issuerCallback', () => {
172167 } )
173168
174169 const nonces = new MemoryStates < CNonceState > ( )
175- await nonces . set ( 'test_value' , { cNonce : 'test_value' , createdAt : + new Date ( ) , issuerState : 'existing-state' } )
170+ await nonces . set ( 'test_value' , { cNonce : 'test_value' , createdAt : + new Date ( ) } )
176171 vcIssuer = new VcIssuerBuilder ( )
177172 . withAuthorizationServers ( 'https://authorization-server' )
178173 . withCredentialEndpoint ( 'https://credential-endpoint' )
@@ -309,6 +304,10 @@ describe('issuerCallback', () => {
309304
310305 const credentialResponse = await vcIssuer . issueCredential ( {
311306 credentialRequest : credentialRequest ,
307+ issuerCorrelation : {
308+ preAuthorizedCode : 'test_code' ,
309+ issuerState : 'existing-state'
310+ } ,
312311 credential,
313312 responseCNonce : state ,
314313 credentialSignerCallback : getIssuerCallbackV1_0_15 ( credential , credentialRequest , didKey . keyPairs , didKey . didDocument . verificationMethod [ 0 ] . id )
0 commit comments