-
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
Sort identity providers by priority in QuarkusIdentityProviderManagerImpl #42179
Sort identity providers by priority in QuarkusIdentityProviderManagerImpl #42179
Conversation
I checked for regression with:
|
providers.values().forEach(providers -> providers.sort(new Comparator<IdentityProvider>() { | ||
@Override | ||
public int compare(IdentityProvider o1, IdentityProvider o2) { | ||
return Integer.compare(o2.priority(), o1.priority()); | ||
} | ||
})); |
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.
Please don't use lambdas here :)
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.
Fixed, thank you!
I opened a new PR (#42306) to add this to CONTRIBUTING.md.
c55a634
to
c743eca
Compare
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!
Status for workflow
|
This adds a new unit test to check that the default implementation of
IdentityProviderManager
effectively sorts bypriority()
(in reverse order) a list ofIdentityProvider
s with the sameAuthenticationRequest
type.