-
Notifications
You must be signed in to change notification settings - Fork 29
add ability to add custom hosts to BaseAuthenticationProvider #484
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
MIchaelMainer
left a comment
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.
nit: missing param description for customHosts.
baywet
left a comment
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.
This would be a breaking change. Add getters and setters on the base auth provider instead. And rely on instance field, not static. Existing value being the default.
Revert changes to the should method. Revert changes to the token auth provider
|
Kudos, SonarCloud Quality Gate passed! |
| this.customHosts = new HashSet<String>(); | ||
| } | ||
| for(String host: customHosts){ | ||
| this.customHosts.add(host.toLowerCase(Locale.ROOT)); |
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.
nit: According to this SO post, we should set this to Locale.ENGLISH in the very rare case we get to country specific endpoints (Turkey in the example) to avoid potential language specific user input error. With that stated, MG will likely define the host names in English so we should be safe even with Locale.ROOT.
No action required as I don't see this scenario happening, just thought I'd share my learning.








Fixes #483