Skip to content

Commit 8d6bc14

Browse files
committed
Added verifyClaims function.
1 parent 67a5ff3 commit 8d6bc14

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • commons/src/main/java/org/eclipse/edc/heleade/commons/verify/claims

commons/src/main/java/org/eclipse/edc/heleade/commons/verify/claims/Claims.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,16 @@ public static boolean verifyClaim(String verifiedClaim, Map<String, Object> part
7878
Object claimToVerify = participantClaims.get(claimKey);
7979
return Objects.equals(verifiedClaim, claimToVerify);
8080
}
81+
82+
/**
83+
* Verifies if the participant's claims match the claims retrieved from FC (represented as `participantClaimsFromFc`).
84+
*
85+
* @param participantClaims the map containing the claims provided by the participant
86+
* @param participantClaimsFromFc the map containing the claims retrieved from the trusted source (FC) for verification
87+
* @return true if the participant's claims match the claims from the trusted source, false otherwise
88+
*/
89+
public static boolean verifyClaims(Map<String, Object> participantClaims, Map<String, Object> participantClaimsFromFc) {
90+
return Objects.equals(participantClaims, participantClaimsFromFc);
91+
}
8192
}
8293

0 commit comments

Comments
 (0)