Skip to content

Commit

Permalink
split daps url into external and internal
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Busk committed Dec 13, 2024
1 parent 78a01ee commit 53f288e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public class AppConfigurer {
@Value("${sd-creation-wizard-api.base-url}")
private String sdCreationWizardApiBaseUri;

@Value("${daps-server.base-url}")
private String dapsServerBaseUri;
@Value("${daps-server.url.internal}")
private String dapsServerInternalUri;

@Value("${did-web-service.base-url}")
private String didWebServiceBaseUri;
Expand All @@ -58,7 +58,7 @@ public SdCreationWizardApiClient sdCreationWizardApiClient() {
@Bean
public OmejdnConnectorApiClient dapsConnectorApiClient() {

WebClient webClient = WebClient.builder().baseUrl(dapsServerBaseUri + "/api/v1/connectors").build();
WebClient webClient = WebClient.builder().baseUrl(dapsServerInternalUri + "/api/v1/connectors").build();
HttpServiceProxyFactory httpServiceProxyFactory = HttpServiceProxyFactory.builder()
.exchangeAdapter(WebClientAdapter.create(webClient)).build();
return httpServiceProxyFactory.createClient(OmejdnConnectorApiClient.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ public ParticipantRegistrationServiceImpl(
@Autowired ParticipantRegistrationServiceMapper participantRegistrationServiceMapper,
@Autowired OmejdnConnectorApiClient omejdnConnectorApiClient,
@Autowired DidWebServiceApiClient didWebServiceApiClient, @Autowired FhCatalogClient fhCatalogClient,
@Value("${fh.catalog.url}") String fhCatalogUrl, @Value("${daps-server.base-url}") String dapsServerBaseUrl) {
@Value("${fh.catalog.url}") String fhCatalogUrl,
@Value("${daps-server.url.external}") String dapsServerExternalUrl) {

this.participantRegistrationRequestDAO = participantRegistrationRequestDAO;
this.participantRegistrationServiceMapper = participantRegistrationServiceMapper;
this.omejdnConnectorApiClient = omejdnConnectorApiClient;
this.didWebServiceApiClient = didWebServiceApiClient;
this.fhCatalogClient = fhCatalogClient;
this.fhCatalogParticipantBaseUrl = fhCatalogUrl + "/resources/legal-participant/";
this.dapsIdBaseUrl = dapsServerBaseUrl + "/api/v1/connectors/";
this.dapsIdBaseUrl = dapsServerExternalUrl + "/api/v1/connectors/";
}

/**
Expand Down
4 changes: 3 additions & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ sd-creation-wizard-api:
base-url: http://localhost:8085

daps-server:
base-url: http://localhost:4567
url:
internal: http://localhost:4567
external: http://localhost:4567

did-web-service:
base-url: https://localhost:4443
Expand Down
4 changes: 3 additions & 1 deletion backend/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ sd-creation-wizard-api:
base-url: test

daps-server:
base-url: test
url:
internal: test
external: test

did-web-service:
base-url: test
Expand Down

0 comments on commit 53f288e

Please sign in to comment.