Ok, I've read the Stack Overflow question 'What does it mean to "program to an interface"' and understand it. I understand the benefit of using interfaces (at least I think I do). However, I'm having a little bit of a problem applying it to what I'm currently working on which would be my first interface implementation.
I'm creating an class to authenticate users to my site . I've written it using static methods so I can do User.Authenticate(username, password). To me, that's nice and easy. Looking forward, there will be 3 other types of members that can authenticate. Their authentication methods will be pointing to different tables, etc. However, they will still need to authenticate, change their password, when changing passwords to verify their security question, etc. It seems like a perfect use for an interface but I'm having issues wrapping my head around how exactly to do it.
The types of users are users, doctors, brokers, employers. To me, each class should implement a security interface that defines the methods mentioned above.
Can anybody shed some light on how to do this AND if my thinking is right?