Skip to content

Commit

Permalink
chore: added more log and tweaked the idp code to make sure our dynam…
Browse files Browse the repository at this point in the history
…ic setting is taken into account
  • Loading branch information
lfdesousa committed Jul 16, 2024
1 parent ae4c997 commit 9a45609
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ch.bfh</groupId>
<artifactId>mobile-access-gateway</artifactId>
<version>0.0.51</version>
<version>0.0.52</version>
<description>FHIR Gateway supporting the PMIR and MHD server actors and uses XDS/PIXV3 to communicate with an XDS Affinity Domain</description>
<packaging>jar</packaging>

Expand Down
16 changes: 13 additions & 3 deletions src/main/java/ch/bfh/ti/i4mi/mag/xua/SamlIDPIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,24 @@ public void shutdown() {
public Map<String, IDPConfig> getIDPs() {
Map<String, IDPConfig> result = new HashMap<String, IDPConfig>();
IDPConfig defaultIdp = getDefaultIdp();
if (defaultIdp != null && defaultIdp.getMetadataUrl() != null) result.put(DEFAULT_IDP, defaultIdp);
if (defaultIdp != null) {
if (metadataIdpLocation != null && !metadataIdpLocation.isEmpty()) {
defaultIdp.setMetadataUrl(metadataIdpLocation);
}
if (defaultIdp.getMetadataUrl() != null) {
result.put(DEFAULT_IDP, defaultIdp);
}
}
log.debug("IDP Metadata URL: {}", defaultIdp != null ? defaultIdp.getMetadataUrl() : "null");
return result;
}

@ConfigurationProperties("mag.iua.idp")
@Bean(name = "idp")
public IDPConfig getDefaultIdp() {
return new IDPConfig();
public IDPConfig getDefaultIdp(){
IDPConfig config = new IDPConfig();
log.debug("Default IDP Metadata URL from properties: {}", config.getMetadataUrl());
return config;
}

@Bean
Expand Down

0 comments on commit 9a45609

Please sign in to comment.