@@ -381,6 +381,8 @@ export class OpenID4VCIClient {
381381 }
382382
383383 public async acquireCredentials ( {
384+ credentialIdentifier,
385+ credentialConfigurationId,
384386 credentialTypes,
385387 context,
386388 proofCallbacks,
@@ -393,7 +395,9 @@ export class OpenID4VCIClient {
393395 deferredCredentialIntervalInMS,
394396 createDPoPOpts,
395397 } : {
396- credentialTypes : string | string [ ]
398+ credentialIdentifier ?: string
399+ credentialConfigurationId ?: string
400+ credentialTypes ?: string | string [ ]
397401 context ?: string [ ]
398402 proofCallbacks : ProofOfPossessionCallbacks
399403 format : CredentialFormat | OID4VCICredentialFormat
@@ -432,10 +436,18 @@ export class OpenID4VCIClient {
432436 : CredentialRequestClientBuilderV1_0_15 . fromCredentialIssuer ( {
433437 credentialIssuer : this . getIssuer ( ) ,
434438 credentialTypes,
439+ credentialIdentifier,
440+ credentialConfigurationId,
435441 metadata : this . endpointMetadata as EndpointMetadataResultV1_0_15 ,
436442 version : this . version ( ) ,
437443 } )
438444
445+ if ( credentialIdentifier ) {
446+ requestBuilder . withCredentialIdentifier ( credentialIdentifier )
447+ } else if ( credentialConfigurationId ) {
448+ requestBuilder . withCredentialConfigurationId ( credentialConfigurationId )
449+ }
450+
439451 // If we are in an auth code flow, without a c nonce, we return the issuerState back to the issuer in case it is present
440452 const issuerState =
441453 this . issuerSupportedFlowTypes ( ) . includes ( AuthzFlowType . AUTHORIZATION_CODE_FLOW ) &&
@@ -449,7 +461,7 @@ export class OpenID4VCIClient {
449461 requestBuilder . withTokenFromResponse ( this . accessTokenResponse )
450462 requestBuilder . withDeferredCredentialAwait ( deferredCredentialAwait ?? false , deferredCredentialIntervalInMS )
451463 let subjectIssuance : ExperimentalSubjectIssuance | undefined
452- if ( this . endpointMetadata ?. credentialIssuerMetadata ) {
464+ if ( this . endpointMetadata ?. credentialIssuerMetadata && credentialTypes ) {
453465 const metadata = this . endpointMetadata . credentialIssuerMetadata
454466 const types = Array . isArray ( credentialTypes ) ? credentialTypes : [ credentialTypes ]
455467
@@ -519,7 +531,7 @@ export class OpenID4VCIClient {
519531
520532 const response = await credentialRequestClient . acquireCredentialsUsingProof ( {
521533 proofInput : proofBuilder ,
522- credentialTypes,
534+ credentialTypes : credentialTypes ?? credentialIdentifier ?? credentialConfigurationId ,
523535 context,
524536 format,
525537 subjectIssuance,
0 commit comments