-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OidcTenantConfig builder #44860
Add OidcTenantConfig builder #44860
Conversation
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@michalvavrik Hi Michal, thanks, going forward, after this PR is merged, what happens when a new property has to be added, while the deprecated |
yes; the former config class group
they will need to use the builder if they want to create the
This can be hard to understand, I can answer further questions to explain what I really mean. |
extensions/oidc/runtime/src/main/java/io/quarkus/oidc/LogoutConfigBuilder.java
Outdated
Show resolved
Hide resolved
I've looked at the code and I see Should we mark though all the deprecated
Sorry, I'm not sure what is the point that you are trying to highlight, I guess, once the |
bb052ce
to
5a958d6
Compare
exactly, fields, setters and constructors are deprecated. I also deprecated getter in favor of the interface methods, but that one is not vital
I'd like that. I didn't mark them for removal because I tried to be conservative. So if you are fine with marking them for removal, we can do that. We could also wait for a release or two.
I tried to show that you can add new property without breaking things. Sorry if that was obvious. |
Do you mean that works because it implements the interface ? It is fine, I don't really expect users do it, they will create |
That is what I meant as well. |
What should we do though about users directly accessing I wonder if we should only keep As far as |
For example, if you do
Users don't have any reason to instantiate this class with
If you believe we should have a shortcut for the
agreed about the other constructor, again I tried to be conservative, but it was there only for one release (3.17), I'll push that
+1, I was just writing |
And about the getters, some return deprecated sub-classes that we could drop, so it is better if users use the new interface methods. Otherwise we need to copy & paste between this classes. |
This comment has been minimized.
This comment has been minimized.
@michalvavrik OK, thanks, please only hide the helper Thanks very much for taking care of this massive restructuring |
5a958d6
to
b0aeefe
Compare
done
yeah, this took a lot of patience, thanks for the review as well |
Status for workflow
|
Status for workflow
|
@ConfigMapping
#39185 (as this is final part, the deprecations and removals will take a long time)OidcTenantConfig
classOidcTenantConfig
class fields and settersOidcCommonConfig
andOidcClientCommonConfig
because my IDE doens't provide hints when these fields are used from theOidcTenantConfig
instance and I want users to be warned; it is bit verbose though!optional.isPresent()
->optional.isEmpty
), not much thoughThese changes will allow us in the future in this order (with long breaks):
OidcTenantConfig
directly, either:OidcTenantConfig
will only be possible to build with the builder by usersextends
to former config classes and only leaveimplements
for the interfacesOidcTenantConfig
as we can build the tenant config directlyThis way, the API for users is in the
io.quarkus.oidc
package, more specifically:io.quarkus.oidc.OidcTenantConfig
io.quarkus.oidc.OidcTenantConfigBuilder