I am trying to use same feign client to call/POST different endpoints (endpoint1, endpoint 2 etc) with below (payload structure is same. One can assume that number of endpoint would continue to remain 3 [say] for the deployed app);
- Endpoint 1 - Authentication Mechanism - OAuth2
- Endpoint 2 - Authentication Mechanism - Basic Auth
- Endpoint 3 - Authentication Mechanism - OAuth2 (different client id/secret/okta)
so far only able to successfully implement calling "endpoint1" with https://www.baeldung.com/spring-cloud-feign-oauth-token as reference, but facing challenges in extending it to support different calls dynamically based on "input", using single feign client. Any help/suggestion is appreciated?
Using Spring Boot 2.7.X and JDK 11.