在 Quarkus 中注入 CompositeAuthenticationProvider 时出错

问题描述 投票:0回答:1

在 Quarkus 2 中,连接 Rest 客户端时出现错误。对于每个对外部 API 的请求,我都会收到以下错误:

“REST api 调用失败,注入错误 gen.apis.project.external.v1.api.auth.CompositeAuthenticationProvider$OidcClientRequestFilterDelegateImpl0 gen.apis.project.external.v1.api.auth.CompositeAuthenticationProvider.oidcClientRequestFilterDelegate0"

在 application.properties 中我有以下配置:

quarkus.openapi-generator.codegen.spec.project_ext_v1_yaml.base-package=gen.apis.project.external.v1 quarkus.openapi-generator.codegen.spec.project_ext_v1_yaml.return-response=true quarkus.openapi-generator.codegen.spec.project_ext_v1_yaml.client-headers-factory=none quarkus.openapi-generator.codegen.spec.project_ext_v1_yaml.custom-register-providers=org.tkit.quarkus.rs.interceptor.TransferEncodingFilter

有人知道可能是什么原因造成的吗?

java maven authentication plugins quarkus
1个回答
0
投票

确保您已设置适当的

quarkus.oidc
属性以使用 OIDC 客户端。

并验证是否添加了 oidc-client 依赖项:

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-oidc-client</artifactId>
    </dependency>
© www.soinside.com 2019 - 2024. All rights reserved.