-
Notifications
You must be signed in to change notification settings - Fork 3k
Add a mapping with only the default values of Auth and Cors #49645
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
Conversation
@michalvavrik, here is an alternate proposal. There is no need for a dummy implementation of |
Thanks @radcortez , I think this is better. Yes, we will use |
This comment has been minimized.
This comment has been minimized.
FYI #49647 fixes the reason why the CORS builder was called so many times. But this PR is proper fix for the linked issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the AuthDefaultConfig
yields the result we need (config defaults) and should be more effective. It is a new class, but we need these defaults, so I am +1. Let's see CI as we have test scenarios verifying this.
This comment has been minimized.
This comment has been minimized.
62231d9
to
9514076
Compare
No worries, I've dropped the dummy class and using the new mapping directly. |
Also renamed |
Status for workflow
|
Status for workflow
|
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
⌛ | Native Tests - Data3 | Logs | Raw logs | 🚧 |
You can consult the Develocity build scans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @radcortez and @michalvavrik
This exposes only the defaults of
AuthRuntimeConfig
andCORSConfig
in a new mappingDefaultsAuthConfig
.This uses
@ConfigMapping
@WithDefaults
@WithUnnamedKey
withMap
to populate defaults for any key. See https://smallrye.io/smallrye-config/Latest/config/mappings/#mapsThe runtime configuration is available in the
Map
associated with thenull
key. A lookup to theMap
with any other keys, yields the config object with the defaults. It is still possible to influence these defaults by using the named keydefaults
as part of the path ofquarkus.http.auth.defaults.*
andquarkus.http.cors.defaults.*
. This is only valid forDefaultsAuthConfig
.