3

i would need create a custom Feign client which will be able to call server api with .p12 client certificate with password. This is HTTPS communication.

Is possible do this? I try override client with configuration

@Configuration
public class FeignConfiguration {

@Bean
public Client feignClient()
 {
    Client trustSSLSockets = new Client.Default(
            sslContextFactory(),
            new NoopHostnameVerifier());

    return trustSSLSockets;
 }
}

but i dont know how to configure sslContextFactory...

Is this possible way ? Or how can i do this.

Thx for help.

Lukas
  • 103
  • 1
  • 9
  • Creating the client bean like that is definitely the right way. Setting up the SSLContextFactory has nothing to do with feign though, you'll need to check how to do what you need in Java, something like: https://stackoverflow.com/a/26779528/5235326 – Clauds Oct 30 '18 at 17:19

0 Answers0