Skip to content

Commit

Permalink
renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Oct 24, 2023
1 parent eeb4c49 commit a32887b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ public Result<Void> verify(String serializedJwt, VerifierContext context) {
if (!map.containsKey(VERIFIABLE_CREDENTIAL_JSON_KEY)) {
return Result.failure("Presentation object did not contain mandatory object: " + VERIFIABLE_CREDENTIAL_JSON_KEY);
}
var credentialTokens = extractCredentials(map.get(VERIFIABLE_CREDENTIAL_JSON_KEY));
var rawCredentials = extractCredentials(map.get(VERIFIABLE_CREDENTIAL_JSON_KEY));

if (credentialTokens.isEmpty()) {
if (rawCredentials.isEmpty()) {
// todo: this is allowed by the spec, but it is semantic nonsense. Should we return failure or not?
return Result.success();
}

// every VC is represented as another JWT, so we verify all of them
for (String token : credentialTokens) {
for (String token : rawCredentials) {
verificationResult = verificationResult.merge(context.withAudience(signedJwt.getJWTClaimsSet().getIssuer()).verify(token));
}

Expand Down

0 comments on commit a32887b

Please sign in to comment.