feign icon indicating copy to clipboard operation
feign copied to clipboard

How to consume an API with digest auth via feign client

Open avx99 opened this issue 2 years ago • 0 comments

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

avx99 avatar Aug 25 '22 14:08 avx99