Skip to content

Commit

Permalink
Merge pull request #527 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-37888 | Make the OIDC client key name configurable to fetch from actuator for mimoto API test rig
  • Loading branch information
Prafulrakhade authored Nov 28, 2024
2 parents a606256 + 8142c4b commit a6ab6f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public static void init() {
Properties props = getproperties(path);
// Convert Properties to Map and add to moduleSpecificPropertiesMap
for (String key : props.stringPropertyNames()) {
moduleSpecificPropertiesMap.put(key, props.getProperty(key));
String value = System.getenv(key) == null ? props.getProperty(key) : System.getenv(key);
moduleSpecificPropertiesMap.put(key, value);
}
} catch (Exception e) {
LOGGER.error(e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ public static String getOTPFromSMTP(String inputJson, TestCaseDTO testCaseDTO) {

public static String getClientIdSection(String baseURL) {
if (baseURL.contains("esignet-mosipid")) {
return "mimoto.oidc.mosipid.partner.clientid";
return MimotoConfigManager.getproperty("mimoto-oidc-mosipid-partner-clientid");
}
if (baseURL.contains("esignet-insurance")) {
return "mimoto.oidc.sunbird.partner.clientid";
return MimotoConfigManager.getproperty("mimoto-oidc-sunbird-partner-clientid");
}

return "mimoto.oidc.partner.clientid";
return MimotoConfigManager.getproperty("mimoto-oidc-partner-clientid");
}
}
5 changes: 4 additions & 1 deletion api-test/src/main/resources/config/mimoto.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
actuatorMimotoEndpoint=/v1/mimoto/actuator/env
sunBirdBaseURL=https://registry.dev1.mosip.net
#Once sunbird registry is pointing to specific env, remove the above line and uncomment below line
#sunBirdBaseURL=registry
#sunBirdBaseURL=registry
mimoto-oidc-mosipid-partner-clientid=mimoto.oidc.mosipid.partner.clientid
mimoto-oidc-sunbird-partner-clientid=mimoto.oidc.sunbird.partner.clientid
mimoto-oidc-partner-clientid=mimoto.oidc.partner.clientid

0 comments on commit a6ab6f6

Please sign in to comment.