Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #327 from hyperledger-labs/fix/credentialDefinitio…
Browse files Browse the repository at this point in the history
…nIds

Fix/credential definition ids
  • Loading branch information
etschelp authored Feb 23, 2021
2 parents 080ac78 + afb91e8 commit 3b20b02
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 35 deletions.
10 changes: 5 additions & 5 deletions backend/business-partner-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.0</version>
<version>4.9.1</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
<version>5.4.2</version>
<version>5.4.5</version>
</dependency>

<!-- Database -->
Expand Down Expand Up @@ -350,7 +350,7 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.11.0</version>
<version>1.11.2</version>
<configuration>
<workingDirectory>../../frontend</workingDirectory>
</configuration>
Expand All @@ -363,8 +363,8 @@
</goals>
<configuration>
<!-- See https://nodejs.org/en/download/ -->
<nodeVersion>v14.15.3</nodeVersion>
<npmVersion>6.14.9</npmVersion>
<nodeVersion>v14.15.5</nodeVersion>
<npmVersion>6.14.11</npmVersion>
</configuration>
</execution>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public Optional<DidDocAPI> getDidDocument(String did) {
.getDidDocument();
} catch (HttpClientResponseException e) {
String msg = "Call to universal resolver failed - msg: " + e.getMessage() + ", status: " + e.getStatus();
log.error(msg);
log.error(msg, e);
throw new PartnerException(msg);
} catch (IOException e) {
log.warn("Could not close connection", e);
Expand Down Expand Up @@ -111,7 +111,7 @@ public Optional<VerifiablePresentation<VerifiableIndyCredential>> getPublicProfi
throw new PartnerException(msg);
} catch (IOException e) {
String msg = "Call to partner web endpoint failed - msg: " + e.getMessage();
log.error(msg);
log.error(msg, e);
throw new PartnerException(msg);
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ public void handleCredential(CredentialExchange credential) {
// holder events, because I could also be an issuer
if ("holder".equals(credential.getRole())) {
synchronized (credMgmt) {
if ("credential_received".equals(credential.getState())) {
credMgmt.handleStoreCredential(credential);
} else if ("credential_acked".equals(credential.getState())) {
if ("credential_acked".equals(credential.getState())) {
credMgmt.handleCredentialAcked(credential);
} else {
credMgmt.handleCredentialEvent(credential);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,6 @@ public void handleCredentialEvent(CredentialExchange credEx) {
});
}

// credential signed, but not in wallet yet
public void handleStoreCredential(CredentialExchange credEx) {
credRepo.findByThreadId(credEx.getThreadId())
.ifPresentOrElse(cred -> {
try {
credRepo.updateState(cred.getId(), credEx.getState());
// TODO should not be necessary with --auto-store-credential set
ac.issueCredentialRecordsStore(credEx.getCredentialExchangeId());
} catch (IOException e) {
log.error("aca-py not reachable", e);
}
}, () -> log.error("Received store credential event without matching thread id"));
}

// credential, signed and stored in wallet
public void handleCredentialAcked(CredentialExchange credEx) {
credRepo.findByThreadId(credEx.getThreadId())
Expand Down
18 changes: 9 additions & 9 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
<skip.docker.build>true</skip.docker.build>
<!-- Dependency Versions -->
<log4j2.version>2.14.0</log4j2.version>
<lombok.version>1.18.16</lombok.version>
<micronaut.version>2.3.0</micronaut.version>
<lombok.version>1.18.18</lombok.version>
<micronaut.version>2.3.2</micronaut.version>
<micronaut.data.version>2.2.4</micronaut.data.version>
<micronaut.openapi.version>2.2.2</micronaut.openapi.version>
<micronaut.openapi.version>2.3.1</micronaut.openapi.version>
<micronaut.security.version>2.3.0</micronaut.security.version>
<mockito.version>3.7.7</mockito.version>
<pmd.version>6.30.0</pmd.version>
<spotbugs.version>4.2.0</spotbugs.version>
<testcontainers.version>1.15.1</testcontainers.version>
<pmd.version>6.31.0</pmd.version>
<spotbugs.version>4.2.1</spotbugs.version>
<testcontainers.version>1.15.2</testcontainers.version>
<!-- Plugin Versions -->
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
<maven.failsafe.plugin.version>2.22.2</maven.failsafe.plugin.version>
Expand Down Expand Up @@ -116,7 +116,7 @@
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>7.5.1</version>
<version>7.5.3</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
Expand Down Expand Up @@ -223,7 +223,7 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.13.0</version>
<version>2.14.0</version>
<executions>
<execution>
<goals>
Expand All @@ -242,7 +242,7 @@
<plugin>
<groupId>io.micronaut.build</groupId>
<artifactId>micronaut-maven-plugin</artifactId>
<version>1.1.4</version>
<version>1.1.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/RequestPresentation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default {
},
{
credentialDefinitionId:
"M6Mbe3qx7vB4wpZF4sBRjt:3:CL:571:bank_account_no_revoc",
"M6Mbe3qx7vB4wpZF4sBRjt:3:CL:571:Bank Account",
label: "Bank Account",
issuer: "Bank",
},
Expand All @@ -123,7 +123,7 @@ export default {
},
{
credentialDefinitionId:
"UmZ25DANwS6ngGWB4ye4tN:3:CL:104:Bank Account",
"SCf4pK5PTvc1LnbUAF2aHD:3:CL:104:Bank Account",
label: "Bank Account",
issuer: "Bank",
},
Expand Down

0 comments on commit 3b20b02

Please sign in to comment.