Do not require authSourceId to be passed to Authenticator constructor.#6
Open
thijskh wants to merge 1 commit intosgomez:masterfrom
Open
Do not require authSourceId to be passed to Authenticator constructor.#6thijskh wants to merge 1 commit intosgomez:masterfrom
thijskh wants to merge 1 commit intosgomez:masterfrom
Conversation
This means the class will just work with any of the configured authentication souces in config.yml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Sergio,
When following the documentation at Step 8 I have a neat twig snippet that will iterate over my n authsources and present a "login with x" button for each, which just iterates over the configuration in config.yml.
However, this does not work out of the box because outside of config.yml, the authsourceid also needs to be passed to the class constructor. So besides the configuration in config.yml you also need to add boilerplate for each authsource, I think.
In this proposed change I just removed the need to pass the authsource to the constructor. This means the authsource name(s) are configured only in one place. And changing it or adding another one only happens there.
It works for me but I might be missing why it was required to pass in an authsource to the constructor. So maybe this breaks something/a different use case? Perhaps you can shed a light on this.
Thanks,
Thijs