spring - 在 Spring Boot 中通过 NTLM 和 Feign Client 进行身份验证
问题描述
我正在尝试使用 Feign Client 通过 NTLM 进行身份验证。
不幸的是,我有一个错误:
feign.FeignException $ Unauthorized: [401 Unauthorized] during [GET] to [url]
@FeignClient(name = "ntmlClient", url = "url", configuration = FeignClientConfiguration.class)
public interface NtmlClient {
@GetMapping(consumes = "application/json", produces = "application/json")
ResponseEntity<Aup> get();
}
@Configuration
public class FeignClientConfiguration {
@Bean
public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
return new BasicAuthRequestInterceptor("admin", "admin");
}
有什么提示吗?Feign Client 可以用于 NTLM 身份验证吗?
解决方案
推荐阅读
- flutter - 颤振扩展瓦片去除尾随
- vue.js - 如何从 Vue.js 中的选定组件中获取选定的选项?
- flutter - 如何在颤动中获得边框侧面颜色
- python - Python在没有C ++ BuildTools的情况下安装漩涡
- objective-c - Objective-C:设备中图像和视频文件路径的完整列表
- css - 移除 iOS 输入的内部阴影
- java - 存储的 xss 安全威胁
- azure - Azure B2C 在令牌中包含应用程序权限作为声明
- javascript - Remove() 函数在 web 的 firebase 中不起作用
- python-3.x - 带有if语句的for循环不显示列表结果