Skip to content
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

Configuration: may be collect resource owner types automatically? #1871

Closed
gassan opened this issue Jan 5, 2022 · 1 comment
Closed

Configuration: may be collect resource owner types automatically? #1871

gassan opened this issue Jan 5, 2022 · 1 comment

Comments

@gassan
Copy link
Contributor

gassan commented Jan 5, 2022


'yahoo' extending GenericOAuth2ResourceOwner, so it should belong to 'oauth2' array.
I think, Configuration::$resrouceOwners array can be calculated automatically with scandir of OAuth/ResourceOwners folder. As well this array can be used to register hwi_oauth.resource_owner.*.class parameters.
I am almost done with review, will send a PR shortly.

Benefits:
We can get oauth type from ResourceOwner::TYPE constant or derive it from class name without ResourceOwner suffix (snake_case).
So we do not need to set type and class no need to set type and class simultaneously.
OAuth[12]ResourceOwner final classes should be created (fixes #1870)
We can get all app classes that implemented ResourceOwnerInterface and register them in the same way.
...

@stloyd
Copy link
Collaborator

stloyd commented Jul 22, 2022

Closing as #1872 was just merged 🚀

@stloyd stloyd closed this as completed Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants