feign
feign copied to clipboard
How to consume an API with digest auth via feign client
I have to consume an API (https://simple_api_resource.com) which is protected by a password and username (digest auth), so I need to pass a username and password to get access to this resource, I created a feign client to consume this API and I want to know how to pass login and password to feign client to get the data:
@FeignClient(url = "https://simple_api_resource.com", name = "DATA-CLIENT")
public interface Client{
@GetMapping
Data getData();
}
any solution about this issue, I tried to create a header with authorization key but it did not work