Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix depend on issue in service offer & update vc url. there is some formatting please ignore for now #195

Closed
wants to merge 5 commits into from
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void hostPolicy(String hostPolicyJson, String hostedPath) {
FileUtils.writeStringToFile(file, hostPolicyJson, Charset.defaultCharset());
this.s3Utils.uploadFile(hostedPath, file);
} catch (Exception e) {
log.error("Error while hosting policy json on path " + hostedPath, e);
log.error("Error while hosting policy json on path {}", hostedPath, e);
} finally {
CommonUtils.deleteFile(file);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public ServiceOfferResponse createServiceOffering(CreateServiceOfferingRequest r
}

String serviceName = "service_" + this.getRandomString();
String serviceHostUrl = this.wizardHost + participant.getId() + "/" + serviceName + ".json";

String serviceHostUrl = signerService.formServiceOfferingJsonUrl(participant.getDomain(), participant.getId(), serviceName);

Map<String, String> labelLevelVc = this.createServiceOfferLabelLevel(participant, request, serviceHostUrl);
Map<String, Object> credentialSubject = request.getCredentialSubject();
Expand All @@ -122,7 +123,8 @@ public ServiceOfferResponse createServiceOffering(CreateServiceOfferingRequest r
request.setCredentialSubject(credentialSubject);

Map<String, String> complianceCredential = this.signerService.signService(participant, request, serviceName);
Credential serviceOffVc = this.credentialService.createCredential(complianceCredential.get(SERVICE_VC), serviceHostUrl, CredentialTypeEnum.SERVICE_OFFER.getCredentialType(), "", participant);

Credential serviceOffVc = this.credentialService.createCredential(complianceCredential.get(SERVICE_VC), serviceHostUrl, CredentialTypeEnum.SERVICE_OFFER.getCredentialType(), "", participant);
List<StandardTypeMaster> supportedStandardList = this.getSupportedStandardList(complianceCredential.get(SERVICE_VC));

ServiceOffer serviceOffer = ServiceOffer.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private String formParticipantJsonUrl(String domain, UUID participantId) {
return this.wizardHost + participantId.toString() + "/" + PARTICIPANT_JSON;
}

private String formServiceOfferingJsonUrl(String domain, UUID participantId, String name) {
public String formServiceOfferingJsonUrl(String domain, UUID participantId, String name) {
if (StringUtils.hasText(domain)) {
return "https://" + domain + "/" + participantId.toString() + "/" + name + JSON_EXTENSION;
}
Expand Down
Loading