Skip to content

Commit

Permalink
code changes as per review
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-vavdiya committed Apr 2, 2024
1 parent 5ff15a1 commit fd6ea43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/eclipse/tractusx/ssi/examples/VC.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ private VC() {
*/
public static VerifiableCredential createVCWithoutProof() {

// VC Builder
final VerifiableCredentialBuilder verifiableCredentialBuilder =
new VerifiableCredentialBuilder();

// VC Subject
final VerifiableCredentialSubject verifiableCredentialSubject =
new VerifiableCredentialSubject(Map.of("test", "test"));

// Using Builder
return verifiableCredentialBuilder
.id(URI.create("did:test:id"))
.type(List.of(VerifiableCredentialType.VERIFIABLE_CREDENTIAL))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public class SignedJwtVerifier {
* @throws DidParseException the did parse error
* @throws DidResolverException the did resolve error
* @throws SignatureVerificationException the signature verification error
* @throws UnsupportedVerificationMethodException the unsupported verification error
* @throws SignatureParseException the signature parse error
*/
public boolean verify(SignedJWT jwt)
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/org/eclipse/tractusx/ssi/lib/proof/IVerifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@

import org.eclipse.tractusx.ssi.lib.exception.did.DidParseException;
import org.eclipse.tractusx.ssi.lib.exception.key.InvalidPublicKeyFormatException;
import org.eclipse.tractusx.ssi.lib.exception.proof.NoVerificationKeyFoundException;
import org.eclipse.tractusx.ssi.lib.exception.proof.SignatureParseException;
import org.eclipse.tractusx.ssi.lib.exception.proof.SignatureVerificationException;
import org.eclipse.tractusx.ssi.lib.exception.proof.UnsupportedSignatureTypeException;
import org.eclipse.tractusx.ssi.lib.model.verifiable.Verifiable;
import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredential;
import org.eclipse.tractusx.ssi.lib.proof.hash.HashedLinkedData;
Expand All @@ -40,14 +38,12 @@ public interface IVerifier {
* @param hashedLinkedData the hashed linked data
* @param verifiable {@link VerifiableCredential} the verifiable
* @return boolean if verified or not
* @throws UnsupportedSignatureTypeException
* @throws SignatureParseException
* @throws InvalidPublicKeyFormatException
* @throws SignatureVerificationException
* @throws DidParseException
* @throws NoVerificationKeyFoundException
* @throws SignatureParseException the signature parse error
* @throws InvalidPublicKeyFormatException the invalid public key error
* @throws SignatureVerificationException the signature verification error
* @throws DidParseException the did parse error
*/
public boolean verify(HashedLinkedData hashedLinkedData, Verifiable verifiable)
boolean verify(HashedLinkedData hashedLinkedData, Verifiable verifiable)
throws SignatureParseException, DidParseException, InvalidPublicKeyFormatException,
SignatureVerificationException;
}

0 comments on commit fd6ea43

Please sign in to comment.