I am writing a authentication Library for Code Igniter (for practice, so please do not suggest e.g. Tank Auth or DX Auth).
The library has basic login functionality, it also has the ability for Facebook and Twitter Logins.
However the Facebook and Twitter login code is hard coded into the Library. Which means that if I decide to add in e.g. Google Logins I have to modify the core of the Library. I don't like this.
I am wondering what ways I could make the library extensible so that Facebook and Twitter logins are "Modules" that can be added.
In this way someone could write a module for Google logins as well and the core of the system would not have to be modified.
How can I make extensible libraries in code igniter?
This sounds like drivers in codeigniter is the right fit for this task. Take a look at the documentation : http://codeigniter.com/user_guide/general/creating_drivers.html