Skip to content

Commit

Permalink
fix: SemanticCheckOfClaims In Verification API (#1124)
Browse files Browse the repository at this point in the history
Signed-off-by: Bassam Riman <[email protected]>
Signed-off-by: Pat Losoponkul <[email protected]>
  • Loading branch information
CryptoKnightIOG authored and Pat Losoponkul committed Jun 13, 2024
1 parent 8be5e48 commit f02f205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ object VcVerificationControllerImplSpec extends ZIOSpecDefault with VcVerificati
signedJwtCredential.value,
List(
ParameterizableVcVerification(VcVerification.SignatureVerification, None),
ParameterizableVcVerification(VcVerification.SemanticCheckOfClaims, None),
ParameterizableVcVerification(VcVerification.NotBeforeCheck, Some(DateTimeParameter(currentTime))),
ParameterizableVcVerification(VcVerification.ExpirationCheck, Some(DateTimeParameter(currentTime)))
)
Expand Down Expand Up @@ -107,6 +108,7 @@ object VcVerificationControllerImplSpec extends ZIOSpecDefault with VcVerificati
signedJwtCredential.value,
List(
VcVerificationResult(VcVerification.SignatureVerification, false),
VcVerificationResult(VcVerification.SemanticCheckOfClaims, true),
VcVerificationResult(VcVerification.NotBeforeCheck, true),
VcVerificationResult(VcVerification.ExpirationCheck, true)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ class VcVerificationServiceImpl(didResolver: DidResolver, uriDereferencer: URIDe
.as(
VcVerificationResult(
credential = credential,
verification = VcVerification.SubjectVerification,
verification = VcVerification.SemanticCheckOfClaims,
success = true
)
)
.catchAll(_ =>
ZIO.succeed(
VcVerificationResult(
credential = credential,
verification = VcVerification.SubjectVerification,
verification = VcVerification.SemanticCheckOfClaims,
success = false
)
)
Expand Down

0 comments on commit f02f205

Please sign in to comment.