You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing you can disabled the oidc client by setting quarkus.oidc-client.enabled to false. This work perfectly in combination with @OidcClientFilter. But not when you are using @RegisterProvider using the default class or custom class.
Expected behavior
oidc Client is disabled when using @RegisterProvider
Actual behavior
Caused by: java.lang.NullPointerException: Cannot invoke "io.quarkus.oidc.client.OidcClients.getClient()" because "oidcClients" is null
at io.quarkus.oidc.client.runtime.AbstractTokensProducer.init(AbstractTokensProducer.java:43)
at io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter_Bean.doCreate(Unknown Source)
at io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter_Bean.create(Unknown Source)
at io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter_Bean.get(Unknown Source)
at io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter_Bean.get(Unknown Source)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:559)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:539)
at io.quarkus.arc.impl.ArcContainerImpl.beanInstanceHandle(ArcContainerImpl.java:572)
at io.quarkus.arc.impl.ArcContainerImpl.instanceHandle(ArcContainerImpl.java:534)
at io.quarkus.arc.impl.ArcContainerImpl.instance(ArcContainerImpl.java:294)
at io.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl.register(RestClientBuilderImpl.java:292)
at io.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl.build(RestClientBuilderImpl.java:408)
at io.quarkus.rest.client.reactive.runtime.QuarkusRestClientBuilderImpl.build(QuarkusRestClientBuilderImpl.java:267)
at io.quarkus.rest.client.reactive.runtime.RestClientCDIDelegateBuilder.build(RestClientCDIDelegateBuilder.java:67)
at io.quarkus.rest.client.reactive.runtime.RestClientCDIDelegateBuilder.createDelegate(RestClientCDIDelegateBuilder.java:49)
at io.quarkus.rest.client.reactive.runtime.RestClientReactiveCDIWrapperBase.delegate(RestClientReactiveCDIWrapperBase.java:76)
at io.quarkus.rest.client.reactive.runtime.RestClientReactiveCDIWrapperBase.<init>(RestClientReactiveCDIWrapperBase.java:30)
How to Reproduce?
create oidc client and disabled it
activate the client by using the annotation @RegisterProvider
Output of uname -a or ver
Microsoft Windows [Version 10.0.19045.4529]
Output of java -version
openjdk 21.0.2 2024-01-16 LTS OpenJDK Runtime Environment Corretto-21.0.2.13.1 (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.2.13.1 (build 21.0.2+13-LTS, mixed mode, sharing)
Quarkus version or git rev
3.12.2
Build tool (ie. output of mvnw --version or gradlew --version)
3.9.6
Additional information
No response
The text was updated successfully, but these errors were encountered:
When you use @RegisterProvider it is done at the REST client level to which OidcClientRequestReactiveFilter.class means only that it is just some provider class, it does not know anything about OIDC client or if the feature is disabled.
@OidcClient is managed directly at the OIDC client build steps level which is only activated if the OIDC client feature is enabled.
We can probably add a check at the filter level to avoid NPEs
Describe the bug
While testing you can disabled the oidc client by setting quarkus.oidc-client.enabled to false. This work perfectly in combination with @OidcClientFilter. But not when you are using @RegisterProvider using the default class or custom class.
Expected behavior
oidc Client is disabled when using @RegisterProvider
Actual behavior
How to Reproduce?
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19045.4529]
Output of
java -version
openjdk 21.0.2 2024-01-16 LTS OpenJDK Runtime Environment Corretto-21.0.2.13.1 (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.2.13.1 (build 21.0.2+13-LTS, mixed mode, sharing)
Quarkus version or git rev
3.12.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)3.9.6
Additional information
No response
The text was updated successfully, but these errors were encountered: