Skip to content

Commit

Permalink
Exchange descriptor.format with contains
Browse files Browse the repository at this point in the history
  • Loading branch information
Jdu278 committed Aug 22, 2024
1 parent f5dcf26 commit 7b2224b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ class PostWalletResponseLive(
WalletResponseValidationError.MissingVpTokenOrPresentationSubmission
}
logger.error("This is the incoming format: ${descriptor.format}")
when (descriptor.format) {
"vc-sd-jwt" -> {
when {
descriptor.format.contains("vc-sd-jwt") -> {
checkSdJwtSignature(token)
logger.info("Successfully verified the sdjwt")
}

"mso_mdoc" -> print("mso_mdoc")
"vc+sd-jwt+zkp" -> {
descriptor.format.contains("mso_mdoc") -> print("mso_mdoc")
descriptor.format.contains("vc+sd-jwt+zkp") -> {
logger.info("Starting zkp verification for SDJWT")
val descriptorId: String = descriptor.id.toString()
val key = presentation.zkpKeys?.get(descriptorId)
Expand All @@ -201,7 +201,7 @@ class PostWalletResponseLive(
logger.info("Proofed SD-JWT with ZK")
}

"mso_mdoc+zkp" -> {
descriptor.format.contains("mso_mdoc+zkp") -> {
logger.info("Starting zkp verification for mDoc")
}

Expand Down

0 comments on commit 7b2224b

Please sign in to comment.