Skip to content

Commit

Permalink
fix: openid4vc draft 13 support (credential-response format removed) (#…
Browse files Browse the repository at this point in the history
…1961)

Signed-off-by: Martin Auer <martin.auer97@gmail.com>
  • Loading branch information
auer-martin authored Jul 22, 2024
1 parent 561e58d commit d15acfe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ export class OpenId4VciHolderService {
const credential = await this.handleCredentialResponse(agentContext, credentialResponse, {
verifyCredentialStatus: verifyCredentialStatus ?? false,
credentialIssuerMetadata: metadata.credentialIssuerMetadata,
format: offeredCredentialConfiguration.format as OpenId4VciCredentialFormatProfile,
})

this.logger.debug('Full credential', credential)
Expand Down Expand Up @@ -615,6 +616,7 @@ export class OpenId4VciHolderService {
options: {
verifyCredentialStatus: boolean
credentialIssuerMetadata: OpenId4VciIssuerMetadata
format: OpenId4VciCredentialFormatProfile
}
): Promise<OpenId4VciCredentialResponse> {
const { verifyCredentialStatus, credentialIssuerMetadata } = options
Expand All @@ -635,7 +637,7 @@ export class OpenId4VciHolderService {
}
: undefined

const format = credentialResponse.successBody.format
const format = options.format
if (format === OpenId4VciCredentialFormatProfile.SdJwtVc) {
if (typeof credentialResponse.successBody.credential !== 'string')
throw new CredoError(
Expand Down

0 comments on commit d15acfe

Please sign in to comment.