-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Provide @ConditionalOn… annotations for all concrete conditions #41044
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
Comments
We wouldn't make the condition itself public, but provide a public annotation that references the condition. That said, without significant demand, I'm not sure that it's something that we'd want to do and copy-pasting the code may be your best option. To help us to decide, can you please describe in a bit more detail what you're trying to do and the role that the condition would perform in that. |
I'm trying to have service(s) that can optionally have SAML enabled via application properties. I am building my own What I have done is define my own |
Thanks for the additional information @OrangeDog. I'm afraid I don't think we should make Give that the class is only about 60 lines I would recommend taking the copy/paste approach that @wilkinsona suggested. |
Fine I guess, but I still have to check and re-copy it every time you change it. |
If it's any consolation, the class hasn't had any functional changes since it was written 5 years ago. |
I found this issue looking for the same problem. While I understand the decision to keep the condition class, it's not really satisfying since the corresponding oauth2 condition is indeed public: ClientsConfiguredCondition. Would it be possible to reconsider the decision? Or, alternatively, add public annotations that reference the conditions? |
|
We discussed this today and we'd like to hide the |
A first pass at this can be found in this branch. I'd like to get some feedback from the team on the names of the new annotations:
We should also consider if we want to list the new annotations in the relevant section of the docs. |
My 2¢ are that the words |
We're going to keep |
As I'm partially customising the SAML configuration, it would be very useful to be able to make my config also conditional on
org.springframework.boot.autoconfigure.security.saml2.RegistrationConfiguredCondition
, rather than having to duplicate it.The text was updated successfully, but these errors were encountered: