Skip to content

Do not require authSourceId to be passed to Authenticator constructor.#6

Open
thijskh wants to merge 1 commit intosgomez:masterfrom
thijskh:feature/remove-authsource-from-constructor
Open

Do not require authSourceId to be passed to Authenticator constructor.#6
thijskh wants to merge 1 commit intosgomez:masterfrom
thijskh:feature/remove-authsource-from-constructor

Conversation

@thijskh
Copy link
Contributor

@thijskh thijskh commented Apr 27, 2019

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

This means the class will just work with any of the configured
authentication souces in config.yml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant