Spring security 使用基本身份验证或oAuth令牌验证对Camel REST API进行身份验证
我不熟悉Camel(在springboot上)并使用“nettyhttp”组件实现restapi 对于服务上的基本身份验证,我知道我们可以验证路由中.process方法中的头,但我不确定这是否是最佳实践 我想知道是否有人可以分享一些关于使用spring security在驼峰路由上实现基本身份验证或oAuth验证的信息 Java DSL代码如下:Spring security 使用基本身份验证或oAuth令牌验证对Camel REST API进行身份验证,spring-security,apache-camel,netty,spring-camel,Spring Security,Apache Camel,Netty,Spring Camel,我不熟悉Camel(在springboot上)并使用“nettyhttp”组件实现restapi 对于服务上的基本身份验证,我知道我们可以验证路由中.process方法中的头,但我不确定这是否是最佳实践 我想知道是否有人可以分享一些关于使用spring security在驼峰路由上实现基本身份验证或oAuth验证的信息 Java DSL代码如下: @Component public class RetrieveRestAPI extends RouteBuilder { @Autowi
@Component
public class RetrieveRestAPI extends RouteBuilder {
@Autowired
RetrieveData retrieveData;
@Override
public void configure() throws Exception {
restConfiguration()
.component("netty-http")
.port("{{http.port}}")
.bindingMode(RestBindingMode.auto)
;
//TODO: Basic Auth
//TODO: oAuth token validation..
rest("/{{BasePath}}/{DataId}")
.get()
.to("direct:fetchData");
from("direct:fetchData")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
log.info("some code here..");
}
})
.end();
}
谢谢你,
V.本指南没有帮助吗?这本指南有用吗?