Skip to content

Commit d265c03

Browse files
authored
fixes #27 register the client config to the module registry (#28)
1 parent 236f18f commit d265c03

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/com/networknt/http/client/HttpClientRequest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.networknt.http.client.ssl.CompositeX509TrustManager;
1010
import com.networknt.monad.Failure;
1111
import com.networknt.monad.Result;
12+
import com.networknt.utility.ModuleRegistry;
1213
import org.apache.commons.lang3.StringUtils;
1314
import org.owasp.encoder.Encode;
1415
import org.slf4j.Logger;
@@ -360,6 +361,14 @@ public static SSLContext createSSLContext() throws IOException {
360361
} else {
361362
logger.error("TLS configuration section is missing in client.yml");
362363
}
364+
// register the client config to the module registry.
365+
List<String> masks = List.of("client_secret", "trustStorePass", "keyStorePass", "keyPass");
366+
ModuleRegistry.registerModule(
367+
ClientConfig.CONFIG_NAME,
368+
HttpClientRequest.class.getName(),
369+
Config.getNoneDecryptedInstance().getJsonMapConfigNoCache(ClientConfig.CONFIG_NAME),
370+
masks
371+
);
363372

364373
return sslContext;
365374
}

0 commit comments

Comments
 (0)