-
Notifications
You must be signed in to change notification settings - Fork 14
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
Rethinking on auth plugin contract #1
Comments
Can you take a first cut at the contract ? We can iterate on that |
Define Interface:
Implement Providers:
And we can use DIP to use AuthProvider everywhere
@msp98 are you suggesting something like this? |
How will the interface look for the following login providers:
the |
We got one step closer with the use of the |
Right now the auth plugin has lots of loginWith methods.
Which might grow as soon as we want to add a new provider method. And this functionality is "closed"(in OCP terms), but not open for adding new providers.
A better way would be to open the plugin interface for adding a provider implementation, and accept a contract for login, logout etc.
This way the core plugin contract will not have to worry about adding new providers, as and when required, keeping the abstractions at the heart and extensibility at the consumer end.
The text was updated successfully, but these errors were encountered: