Http.outboundGateway上的Spring Integration DSL OAuth

我对Spring-Integration有点陌生,并一直在尝试POC一些简单的任务。从未接触过OAuth并需要OAuth提供休息服务,我希望有人能向我展示一个在Java DSL上使用OAuth的示例。我目前正在从Rabbit接收消息,然后转换为JAVA POJO,然后将其发送到新通道以发布到Rest服务,但是我需要首先针对服务器进行身份验证。正如我对SI和OAuth所说的,并寻找一些建议。我似乎在使用OAuth的DSL上找不到任何东西


    @Bean
    public IntegrationFlow amqpInboundGateway(ConnectionFactory connectionFactory,@Value("${rabbitmq.queue}") String queue) {
        return IntegrationFlows.from(Amqp.inboundGateway(connectionFactory,queue))
                .transform(Transformers.toJson())
                .transform(Transformers.fromJson(Call.class))
                .log(message -> message.getPayload())
                .channel("rabbitOutput")
                .get();
    }

    @Bean
    public IntegrationFlow httpPostAtms( @Value("${alemba.incident.get}") String uri) {

        return IntegrationFlows.from("rabbitOutput")
                .handle(Http.outboundGateway(uri)
                        .httpMethod(HttpMethod.POST)
                        .extractPayload(true))
                .transform(Transformers.toJson())
                .log()
                .get();

    }

GFHJTYHTR 回答:Http.outboundGateway上的Spring Integration DSL OAuth

我不熟悉OAuth,但是可以使用外部Http.outboundGateway()来配置RestTemplate,该外部 Name 0 "jackolsen" 1 "IsabelClark" 2 "JaneDoe" 3 "JackOlsen" 4 "JACKOLSEN" 5 "MariaSmith" 6 "JohnSmith" 7 "MaryKent" 8 "MaryKent" 可以通过任何可能的方式进行定制。请了解有关Spring Security中的OAuth的更多信息:https://docs.spring.io/spring-security/site/docs/5.2.1.RELEASE/reference/htmlsingle/#oauth2。在Spring Integration中,没有任何事情要做:完全没有项目责任

本文链接:https://www.f2er.com/3152723.html

大家都在问