I am using Feign Client to call another microservice as below:
@FeignClient("employee")
public interface EmployeeFeignClient {
@RequestMapping(
method= RequestMethod.GET,
value="/employee/code/{code}",
consumes="application/json"
)
EmployeeResponseEntity getEmployeeByCode(@PathVariable("code") String code);
}
The service which calls the employee service will have authentication bearer token in its request header. I need to pass this same token to the service call being made. Tried to find on how to achieve the same but could not. Some help would be nice.