Open mkomadel opened 4 months ago
/cc @pedroigor (oidc), @sberyozkin (oidc)
@mkomadel Can you check if avoiding the discovery with setting quarkus.oidc-client.token-path=absolute_token_uri
and, only if you use RestEasy Classic, quarkus.oidc-client.early-tokens-acquisition=false
, solves the problem ?
I don't mind retrying the OidcClient connection request if it failed during the bootstrap time, as we do with quarkus-oidc
but the above suggestion should offer a simple workaround
@sberyozkin yes that is what I am doing at the moment and it works. But quarkus.oidc-client.token-path
avoids doing the discovery, that is why I wrote this enhancement.
Description
When using quarkus-oidc-client extension, OIDC discovery is executed on application startup, which causes errors when the OIDC server is down at the time.
It would be nice to have an option to enable "lazy" discovery which would be executed once OidcClient ist first used.
Implementation ideas
I am no expert in mutiny but, maybe putting the tokenRequestUri in an Uni could be the solution. On eager OIDC discovery, it would contain the value, on lazy discovery http calls would be triggered (and the result saved using some kind of shareReplay mutiny alternative).