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
Signed-off-by: Martin Auer <martin.auer97@gmail.com>
  • Loading branch information
auer-martin committed Jul 22, 2024
1 parent 561e58d commit a3fe108
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 a3fe108

Please sign in to comment.